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
- Quota not resetting
hi, im using appwrite's free tier plani hit my read limts last month and the billing cycle said it would reset on june 4th but that is today, the billing cycle ...
- Request for temporary 3 to 4 hours datab...
Hi Appwrite Team, I hope you are doing well.We are an early-stage startup currently running on Appwrite Cloud. We have unfortunately exhausted our database rea...
- Storage Chunk upload bug
Hi, I'm experiencing an issue with Appwrite Storage chunked uploads. Small files upload successfully, but larger video files that require chunking fail. For ...