Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reemitter not being correctly wired on user objects created in storage classes #3796

Merged
merged 10 commits into from Oct 27, 2023

Conversation

MidhunSureshR
Copy link
Contributor

@MidhunSureshR MidhunSureshR commented Oct 12, 2023

Storage classes - memory.ts and indexeddb.ts both create user objects without setting it up to emit events on matrix client.
This is sometimes preventing the memberlist from updating on incoming presence events because this listener never runs.


Here's what your changelog entry will look like:

馃悰 Bug Fixes

  • Fix reemitter not being correctly wired on user objects created in storage classes (#3796). Contributed by @MidhunSureshR.

@MidhunSureshR MidhunSureshR added the T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems label Oct 12, 2023
* Set the user creator which is used for creating User objects
* @param creator - A callback that accepts an user-id and returns an User object
*/
setUserCreator(creator: UserCreator): void;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Temporary solution until we fix element-hq/element-web#26383

Copy link
Contributor Author

@MidhunSureshR MidhunSureshR left a comment

Choose a reason for hiding this comment

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

.

@MidhunSureshR MidhunSureshR marked this pull request as ready for review October 17, 2023 12:58
@MidhunSureshR MidhunSureshR requested a review from a team as a code owner October 17, 2023 12:58
Copy link
Contributor

@germain-gg germain-gg left a comment

Choose a reason for hiding this comment

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

Thank you for opening this up!
A few things I believe should be updated

src/models/user.ts Outdated Show resolved Hide resolved
src/models/user.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@germain-gg germain-gg left a comment

Choose a reason for hiding this comment

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

Thank you, LGTM

@MidhunSureshR MidhunSureshR added this pull request to the merge queue Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants