Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug Report: Pref returned as List instead of Map for User & Account Model in Realtime #7797

Closed
2 tasks done
JoshiJoshiJoshi opened this issue Mar 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@JoshiJoshiJoshi
Copy link

👟 Reproduction steps

When trying to convert the payload in realtime of the account channel to the "User" model it throws an error.
Same for the teams channel when trying to convert to the "Teams" model. Apparently realtime returns a list for preferences for the User and Team model instead of a map. Retrieving the models from the REST api work as expected but not from realtime.

This has already been mentioned in a comment here:
appwrite/sdk-for-flutter#33

I'm using Appwrite 1.5.2 selfhosted and appwrite 12.0.1 for flutter.

👍 Expected behavior

Listen to "account" channel.
Change user account.
Realtime returns RealtimeMessage.
=> Convert RealtimeMessage.payload to User model successfully

👎 Actual Behavior

Does not convert to User model successfully due to the prefs being in a wrong format.
It is being returned as a list and not a map.

🎲 Appwrite version

Different version (specify in environment)

💻 Operating system

Linux

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@JoshiJoshiJoshi JoshiJoshiJoshi added the bug Something isn't working label Mar 11, 2024
@stnguyen90
Copy link
Contributor

@JoshiJoshiJoshi, thanks for creating this issue! 🙏🏼 This looks the same as #6360 so I'm going to close this and you can 👍🏼 the other issue.

@stnguyen90 stnguyen90 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants