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
- how think about relationships?
From what I understand, relationships don't work like foreign keys. So, two things: Is the way to simulate foreign keys to manually pass references to IDs? In...
- Appwrite - Github student plan payment
Even though I have the GitHub Student package, I received a notification saying I would be switched to a pay-as-you-go plan. (It said that I could use AppWrite ...
- SMS - Github Student Pack
I have a project on Appwrite Github Student Pack but unable to send any message as I get error: "Phone authentication limit for your organization has exceeded. ...