Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
conduwuit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
🥺
conduwuit
Commits
cc4e6e21
Commit
cc4e6e21
authored
1 year ago
by
Jakub Kubík
Committed by
🥺
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
fix(sync): correctly update presence properties
parent
69025d30
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/api/client_server/sync.rs
+6
-8
6 additions, 8 deletions
src/api/client_server/sync.rs
with
6 additions
and
8 deletions
src/api/client_server/sync.rs
+
6
−
8
View file @
cc4e6e21
...
...
@@ -554,17 +554,15 @@ async fn process_room_presence_updates(
// Update existing presence event with more info
curr_content
.presence
=
new_content
.presence
;
curr_content
.status_msg
=
curr_content
.status_msg
.clone
()
.or
(
new_content
.status_msg
);
curr_content
.status_msg
=
new_content
.status_msg
.or
(
curr_content
.status_msg
.take
());
curr_content
.last_active_ago
=
curr
_content
.last_active_ago
.or
(
new
_content
.last_active_ago
);
new
_content
.last_active_ago
.or
(
curr
_content
.last_active_ago
);
curr_content
.displayname
=
curr_content
.displayname
.clone
()
.or
(
new_content
.displayname
);
curr_content
.avatar_url
=
curr_content
.avatar_url
.clone
()
.or
(
new_content
.avatar_url
);
curr_content
.currently_active
=
curr_content
new_content
.displayname
.or
(
curr_content
.displayname
.take
());
curr_content
.avatar_url
=
new_content
.avatar_url
.or
(
curr_content
.avatar_url
.take
());
curr_content
.currently_active
=
new_content
.currently_active
.or
(
new
_content
.currently_active
);
.or
(
curr
_content
.currently_active
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment