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
3d3da2b4
Commit
3d3da2b4
authored
9 years ago
by
Mark Haines
Browse files
Options
Downloads
Patches
Plain Diff
Only fire user_joined_room on the distributor if the user has actually joined the room
parent
f593a6e5
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/room.py
+6
-4
6 additions, 4 deletions
synapse/handlers/room.py
with
6 additions
and
4 deletions
synapse/handlers/room.py
+
6
−
4
View file @
3d3da2b4
...
@@ -517,10 +517,12 @@ class RoomMemberHandler(BaseHandler):
...
@@ -517,10 +517,12 @@ class RoomMemberHandler(BaseHandler):
do_auth
=
do_auth
,
do_auth
=
do_auth
,
)
)
user
=
UserID
.
from_string
(
event
.
user_id
)
prev_state
=
context
.
current_state
.
get
((
event
.
type
,
event
.
state_key
))
yield
self
.
distributor
.
fire
(
if
not
prev_state
or
prev_state
.
membership
!=
Membership
.
JOIN
:
"
user_joined_room
"
,
user
=
user
,
room_id
=
room_id
user
=
UserID
.
from_string
(
event
.
user_id
)
)
yield
self
.
distributor
.
fire
(
"
user_joined_room
"
,
user
=
user
,
room_id
=
room_id
)
@defer.inlineCallbacks
@defer.inlineCallbacks
def
get_inviter
(
self
,
event
):
def
get_inviter
(
self
,
event
):
...
...
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