Okay
And how about user online status?
what kind of system design do you have in place? is one chat a document? or somethin
You could use the User Preferences for this
So when a user opens the app, change the 'isOnline' preference to true, and vice versa
Okay I will explain,
I have a list of friends, so any two people can have a conversation and so the conversation id is unique to these two people only.
On a chatting screen, when this two people are texting, i save messages with this unique conversation id
and each conversation is a document?
Yes
Would you like to have a look?
okay and how do you save the messages? Is it as a JSON object or something?
Aaaaaaa messages are in a collection as a document
Has attributes
okay i guess it wold be better if you showed me your full database structure.
Yes sure
Can I call you, to screen share?
I'd prefer if you can send screenshots or a video recording. I cant hop on a call right now.
okay sure
Tha kyou. But how do i update when I do offline suddenly?
Check out this package on pub: https://pub.dev/packages/flutter_fgbg
If the app is on the foreground, it's being used which means a user is online. If it's in the background, it is not being used so user is offline.
Thankyou Mr.Safwan
@Nuaiman Does that solves your issue?
@D5 couldnt try yet, my pc died on me. Waiting for it to get fixed
Recommended threads
- Hi Appwrite Support Team,My project has ...
Details: Project ID: 69a69f6f00113ed0e8e4 Region: SFO (sfo.cloud.appwrite.io) Error Response: Affected: ALL endpoints — Functions, Databases, Storage, Health, ...
- Sudden CORS Errors - Domain hasn't Chang...
I have an Appwrite project with two web apps configured, the first one has the hostname `*` and the second one I just added to test if it could fix the issue wi...
- Any way to temporarily bypass the email ...
Hey guys, any way to bypass the email verification to use the accounts again? i need to recover some projects that due to recent changes have been stopped, and ...