kerimamansaryyev / dart_pusher_channels

MIT License
49 stars 14 forks source link

if the received message is a list instead of object it fails #17

Closed EquineSolutions closed 1 year ago

EquineSolutions commented 1 year ago

i think the problem is coming from the fact that jsonize function only returns a map Map jsonize(raw) { Map data; if (raw is String) { data = jsonDecode(raw); } else { data = {}; } return data; }

kerimamansaryyev commented 1 year ago

@EquineSolutions , Well, you are not supposed to receive raw List in Pusher Protocol. Please, give an example of event or message that comes from your server side to understand your use-case.

EquineSolutions commented 1 year ago

Well, if we are not supposed to receive raw List in Pusher Protocol, then it's my problem, although it works int he browser with laravel pusher client, you can close this issue, keep up the good work

kerimamansaryyev commented 1 year ago

@EquineSolutions , could you please share an example message coming from your server? And we will sort it out

kerimamansaryyev commented 1 year ago

I am preparing a big update with refactoring. I guess I know what you need. data inside the root object may not always be a Map, I hadn't considered it. Just wait for a new big update.

EquineSolutions commented 1 year ago

@kerimamansaryyev exactly, i think you should just pass the json data as a plain text.

kerimamansaryyev commented 1 year ago

@EquineSolutions Hey, checkout the new version (1.0.0) with new documentation! I am sure it should fix the issue.

kerimamansaryyev commented 1 year ago

@EquineSolutions , have you checked the update?

kerimamansaryyev commented 1 year ago

@EquineSolutions , Closing this issue due to inactivity. Please, check out the new version. If it does not solve the issue - feel free to reopen it.