Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
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
Maunium
synapse
Commits
b4b49282
Commit
b4b49282
authored
10 years ago
by
Kegan Dougal
Browse files
Options
Downloads
Patches
Plain Diff
SYWEB-112: Use the right user ID when determining invites for display on the recents list.
parent
0f192579
No related branches found
Branches containing commit
Tags
v1.42.0
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
webclient/components/matrix/matrix-filter.js
+9
-2
9 additions, 2 deletions
webclient/components/matrix/matrix-filter.js
with
9 additions
and
2 deletions
webclient/components/matrix/matrix-filter.js
+
9
−
2
View file @
b4b49282
...
...
@@ -47,7 +47,6 @@ angular.module('matrixFilter', [])
else
if
(
room
.
members
&&
!
isPublicRoom
)
{
// Do not rename public room
var
user_id
=
matrixService
.
config
().
user_id
;
// Else, build the name from its users
// Limit the room renaming to 1:1 room
if
(
2
===
Object
.
keys
(
room
.
members
).
length
)
{
...
...
@@ -65,8 +64,16 @@ angular.module('matrixFilter', [])
var
otherUserId
;
if
(
Object
.
keys
(
room
.
members
)[
0
]
&&
Object
.
keys
(
room
.
members
)[
0
]
!==
user_id
)
{
if
(
Object
.
keys
(
room
.
members
)[
0
])
{
otherUserId
=
Object
.
keys
(
room
.
members
)[
0
];
// this could be an invite event (from event stream)
if
(
otherUserId
===
user_id
&&
room
.
members
[
user_id
].
content
.
membership
===
"
invite
"
)
{
// this is us being invited to this room, so the
// *user_id* is the other user ID and not the state
// key.
otherUserId
=
room
.
members
[
user_id
].
user_id
;
}
}
else
{
// it's got to be an invite, or failing that a self-chat;
...
...
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