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

Fix state resets #3231

Merged
merged 9 commits into from
Oct 23, 2023
Merged

Fix state resets #3231

merged 9 commits into from
Oct 23, 2023

Conversation

S7evinK
Copy link
Contributor

@S7evinK S7evinK commented Oct 6, 2023

@S7evinK S7evinK added T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. S-Critical Blocks development, potential data loss, more than 25% of users possibly affected, no workarounds. F-State-Res labels Oct 6, 2023
@@ -300,7 +300,7 @@ func updateProfile(
}, e
}

if err := api.SendEvents(ctx, rsAPI, api.KindNew, events, device.UserDomain(), domain, domain, nil, true); err != nil {
if err := api.SendEvents(ctx, rsAPI, api.KindNew, events, device.UserDomain(), domain, domain, nil, false); err != nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This slows down changing profiles, but makes sure that all events have been sent to the roomserver.
This is needed, as e.g. bridges may change the avatar and displayname in short succession.

@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (933ae2d) 65.99% compared to head (15a1535) 65.18%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3231      +/-   ##
==========================================
- Coverage   65.99%   65.18%   -0.82%     
==========================================
  Files         507      507              
  Lines       57155    57174      +19     
==========================================
- Hits        37718    37267     -451     
- Misses      15656    16009     +353     
- Partials     3781     3898     +117     
Flag Coverage Δ
unittests 49.47% <77.77%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
clientapi/routing/profile.go 47.50% <0.00%> (ø)
userapi/internal/device_list_update.go 72.09% <80.76%> (-3.18%) ⬇️

... and 73 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@devonh devonh left a comment

Choose a reason for hiding this comment

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

Changes look great & test is clear!

@S7evinK S7evinK marked this pull request as ready for review October 23, 2023 12:20
@S7evinK S7evinK requested a review from a team as a code owner October 23, 2023 12:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F-State-Res S-Critical Blocks development, potential data loss, more than 25% of users possibly affected, no workarounds. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Users can no longer write after changing their display names
2 participants