-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: fetch the users presence asynchronously (isOnline) #1101
Conversation
src/store/channels-list/saga.ts
Outdated
|
||
if (conversation.isOneOnOne && matrixId) { | ||
if (isOneOnOne && matrixId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we still show the green dot on group conversations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah actually I don't think this will won't work for group conversations. I'll need to take another look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/store/channels-list/saga.ts
Outdated
if (isOnline) { | ||
member.isOnline = isOnline; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if isOnline
is false? don't we need to set it to false for the user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah if the user is offline (i.e., if the presence value is anything other than 'online'), the method will return isOnline: false handled in getUserPresence
const isOnline = presence === 'online';
What does this do?
isOnline
status by fetching the correct data using matrixsgetPresence
method.Why are we making this change?
getUser
, to set the users online status, this accidentally works as the user will be defaulted tooffline
. UsinggetPresence
asynchronously will return the users correct online status. Similar to how we are getting the last seen at data.How do I test this?
Key decisions and Risk Assessment:
Things to consider: