glacasa/Mastonet

Mastodon v3.3.0 streaming is broken

sftblw opened this issue · 1 comments

What happens:

exception on user streaming notification.

  • happens after: Mastodon v3.3.0

Caused by:

Mastodon 3.3.0 introduces multiple streaming subscription in one connection, thus stream kind key "stream" looks like now array.

var message = JsonConvert.DeserializeObject<Dictionary<string, string>>(messageStr);

This causes exception on this data:

{"stream":["user"],"event":"notification","payload":"{ (user object is manually removed) }"}

exception: Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: [. Path 'stream', line 1, position 11. so, array part, "stream": ["user"].

Hello, thanks for your message.
I have fixed the streaming issue, it is now on Nuget : https://www.nuget.org/packages/Mastonet/1.8.2

There is more work to support this new Mastodon feature, I have added an issue to track it #76