Rank 3: Container
How to subscribe pref for realtime update
Votes
0
Replies
9
Participants
Unknown
Messages
10
Rank 3: Container
How to subscribe pref for realtime update
Hi - I do not understand your question completely but do you want to know how to subscribe to changes to user preferences using realtime?
You can use realtime ( https://appwrite.io/docs/realtime ) and subscribe to channel account.
Then, when you get the payload, you check events. There, the first event is the most specific one. So you could do if statement like payload.events[0].includes('prefs.update')
Feel free to correct me if I understood the question wrong
Rank 3: Container
using this users.*.update.*.prefs ?
Rank 3: Container
but this is not triggering when i am trying to update prefs.
Rank 3: Container
have you got my point?
Hi @joeyouss. So when you check for the payload.events[0].includes(‘prefs.update’)
What do I do to make sure that the update appears in real time?
Admin
Are you using account as the channel just like Jyoti recommended?
Admin
Please create a new #channel post and include your code
Rank 3: Container
just subscribe account channel and you are good to go.