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
Package registry
Container registry
Model registry
Operate
Terraform modules
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
Timo Ley
synapse
Commits
86bcf4d6
Commit
86bcf4d6
authored
8 years ago
by
Erik Johnston
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/pagination
parents
ba07d4a7
928b2187
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
synapse/handlers/room_member.py
+12
-2
12 additions, 2 deletions
synapse/handlers/room_member.py
synapse/rest/client/v1/room.py
+1
-0
1 addition, 0 deletions
synapse/rest/client/v1/room.py
with
13 additions
and
2 deletions
synapse/handlers/room_member.py
+
12
−
2
View file @
86bcf4d6
...
@@ -59,10 +59,13 @@ class RoomMemberHandler(BaseHandler):
...
@@ -59,10 +59,13 @@ class RoomMemberHandler(BaseHandler):
prev_event_ids
,
prev_event_ids
,
txn_id
=
None
,
txn_id
=
None
,
ratelimit
=
True
,
ratelimit
=
True
,
content
=
None
,
):
):
if
content
is
None
:
content
=
{}
msg_handler
=
self
.
hs
.
get_handlers
().
message_handler
msg_handler
=
self
.
hs
.
get_handlers
().
message_handler
content
=
{
"
membership
"
:
membership
}
content
[
"
membership
"
]
=
membership
if
requester
.
is_guest
:
if
requester
.
is_guest
:
content
[
"
kind
"
]
=
"
guest
"
content
[
"
kind
"
]
=
"
guest
"
...
@@ -140,6 +143,7 @@ class RoomMemberHandler(BaseHandler):
...
@@ -140,6 +143,7 @@ class RoomMemberHandler(BaseHandler):
remote_room_hosts
=
None
,
remote_room_hosts
=
None
,
third_party_signed
=
None
,
third_party_signed
=
None
,
ratelimit
=
True
,
ratelimit
=
True
,
content
=
None
,
):
):
key
=
(
room_id
,)
key
=
(
room_id
,)
...
@@ -153,6 +157,7 @@ class RoomMemberHandler(BaseHandler):
...
@@ -153,6 +157,7 @@ class RoomMemberHandler(BaseHandler):
remote_room_hosts
=
remote_room_hosts
,
remote_room_hosts
=
remote_room_hosts
,
third_party_signed
=
third_party_signed
,
third_party_signed
=
third_party_signed
,
ratelimit
=
ratelimit
,
ratelimit
=
ratelimit
,
content
=
content
,
)
)
defer
.
returnValue
(
result
)
defer
.
returnValue
(
result
)
...
@@ -168,7 +173,11 @@ class RoomMemberHandler(BaseHandler):
...
@@ -168,7 +173,11 @@ class RoomMemberHandler(BaseHandler):
remote_room_hosts
=
None
,
remote_room_hosts
=
None
,
third_party_signed
=
None
,
third_party_signed
=
None
,
ratelimit
=
True
,
ratelimit
=
True
,
content
=
None
,
):
):
if
content
is
None
:
content
=
{}
effective_membership_state
=
action
effective_membership_state
=
action
if
action
in
[
"
kick
"
,
"
unban
"
]:
if
action
in
[
"
kick
"
,
"
unban
"
]:
effective_membership_state
=
"
leave
"
effective_membership_state
=
"
leave
"
...
@@ -218,7 +227,7 @@ class RoomMemberHandler(BaseHandler):
...
@@ -218,7 +227,7 @@ class RoomMemberHandler(BaseHandler):
if
inviter
and
not
self
.
hs
.
is_mine
(
inviter
):
if
inviter
and
not
self
.
hs
.
is_mine
(
inviter
):
remote_room_hosts
.
append
(
inviter
.
domain
)
remote_room_hosts
.
append
(
inviter
.
domain
)
content
=
{
"
membership
"
:
Membership
.
JOIN
}
content
[
"
membership
"
]
=
Membership
.
JOIN
profile
=
self
.
hs
.
get_handlers
().
profile_handler
profile
=
self
.
hs
.
get_handlers
().
profile_handler
content
[
"
displayname
"
]
=
yield
profile
.
get_displayname
(
target
)
content
[
"
displayname
"
]
=
yield
profile
.
get_displayname
(
target
)
...
@@ -272,6 +281,7 @@ class RoomMemberHandler(BaseHandler):
...
@@ -272,6 +281,7 @@ class RoomMemberHandler(BaseHandler):
txn_id
=
txn_id
,
txn_id
=
txn_id
,
ratelimit
=
ratelimit
,
ratelimit
=
ratelimit
,
prev_event_ids
=
latest_event_ids
,
prev_event_ids
=
latest_event_ids
,
content
=
content
,
)
)
@defer.inlineCallbacks
@defer.inlineCallbacks
...
...
This diff is collapsed.
Click to expand it.
synapse/rest/client/v1/room.py
+
1
−
0
View file @
86bcf4d6
...
@@ -268,6 +268,7 @@ class JoinRoomAliasServlet(ClientV1RestServlet):
...
@@ -268,6 +268,7 @@ class JoinRoomAliasServlet(ClientV1RestServlet):
action
=
"
join
"
,
action
=
"
join
"
,
txn_id
=
txn_id
,
txn_id
=
txn_id
,
remote_room_hosts
=
remote_room_hosts
,
remote_room_hosts
=
remote_room_hosts
,
content
=
content
,
third_party_signed
=
content
.
get
(
"
third_party_signed
"
,
None
),
third_party_signed
=
content
.
get
(
"
third_party_signed
"
,
None
),
)
)
...
...
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