Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix welcome user #3106

Merged
merged 4 commits into from
Jun 14, 2019
Merged

Fix welcome user #3106

merged 4 commits into from
Jun 14, 2019

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Jun 14, 2019

#3101 meant we
don't get logged straight in after registering if using an email
address, but this was the point at which we made a chat with the
welcome user. Instead, set a flag in memory that we should try &
make a chat with the welcome user for that user ID if we get a
session for them.

Of course, if the user logs in on both tabs, this would mean each
would make a chat with the welcome user (although actually this
was a problem with the old code too). Check our m.direct to see if
we've started a chat with the welcome user before making one (which
also means we have to make sure the cached sync is up to date...
see comments).

Requires matrix-org/matrix-js-sdk#956

#3101 meant we
don't get logged straight in after registering if using an email
address, but this was the point at which we made a chat with the
welcome user. Instead, set a flag in memory that we should try &
make a chat with the welcome user for that user ID if we get a
session for them.

Of course, if the user logs in on both tabs, this would mean each
would make a chat with the welcome user (although actually this
was a problem with the old code too). Check our m.direct to see if
we've started a chat with the welcome user before making one (which
also means we have to make sure the cached sync is up to date...
see comments).
@dbkr dbkr requested a review from a team June 14, 2019 14:42
Copy link
Contributor

@bwindels bwindels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sort off looks good, although I'm unsure why the store.save(true) is needed, see comment.

src/components/structures/MatrixChat.js Outdated Show resolved Hide resolved
src/components/structures/MatrixChat.js Outdated Show resolved Hide resolved
@dbkr dbkr requested a review from bwindels June 14, 2019 15:31
@dbkr dbkr merged commit 4ce72fd into develop Jun 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants