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
6ae8373d
Commit
6ae8373d
authored
7 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Don't assume existance of events when updating user directory
parent
a837765e
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
synapse/handlers/user_directory.py
+6
-3
6 additions, 3 deletions
synapse/handlers/user_directory.py
with
6 additions
and
3 deletions
synapse/handlers/user_directory.py
+
6
−
3
View file @
6ae8373d
...
@@ -225,7 +225,7 @@ class UserDirectoyHandler(object):
...
@@ -225,7 +225,7 @@ class UserDirectoyHandler(object):
logger
.
debug
(
"
Server is still in room: %r
"
,
room_id
)
logger
.
debug
(
"
Server is still in room: %r
"
,
room_id
)
if
change
:
# The user joined
if
change
:
# The user joined
event
=
yield
self
.
store
.
get_event
(
event_id
)
event
=
yield
self
.
store
.
get_event
(
event_id
,
allow_none
=
True
)
profile
=
ProfileInfo
(
profile
=
ProfileInfo
(
avatar_url
=
event
.
content
.
get
(
"
avatar_url
"
),
avatar_url
=
event
.
content
.
get
(
"
avatar_url
"
),
display_name
=
event
.
content
.
get
(
"
displayname
"
),
display_name
=
event
.
content
.
get
(
"
displayname
"
),
...
@@ -379,8 +379,11 @@ class UserDirectoyHandler(object):
...
@@ -379,8 +379,11 @@ class UserDirectoyHandler(object):
if
not
prev_event_id
or
not
event_id
:
if
not
prev_event_id
or
not
event_id
:
return
return
prev_event
=
yield
self
.
store
.
get_event
(
prev_event_id
)
prev_event
=
yield
self
.
store
.
get_event
(
prev_event_id
,
allow_none
=
True
)
event
=
yield
self
.
store
.
get_event
(
event_id
)
event
=
yield
self
.
store
.
get_event
(
event_id
,
allow_none
=
True
)
if
not
prev_event
or
not
event
:
return
if
event
.
membership
!=
Membership
.
JOIN
:
if
event
.
membership
!=
Membership
.
JOIN
:
return
return
...
...
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