Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
ea3442c1
Commit
ea3442c1
authored
7 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Add docstring
parent
0f942f68
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/handlers/room_member.py
+26
-0
26 additions, 0 deletions
synapse/handlers/room_member.py
with
26 additions
and
0 deletions
synapse/handlers/room_member.py
+
26
−
0
View file @
ea3442c1
...
...
@@ -139,6 +139,19 @@ class RoomMemberHandler(object):
@defer.inlineCallbacks
def
remote_join
(
self
,
remote_room_hosts
,
room_id
,
user
,
content
):
"""
Try and join a room that this server is not in
Args:
remote_room_hosts (list[str]): List of servers that can be used
to join via.
room_id (str): Room that we are trying to join
user (UserID): User who is trying to join
content (dict): A dict that should be used as the content of the
join event.
Returns:
Deferred
"""
if
len
(
remote_room_hosts
)
==
0
:
raise
SynapseError
(
404
,
"
No known servers
"
)
...
...
@@ -156,6 +169,19 @@ class RoomMemberHandler(object):
@defer.inlineCallbacks
def
_remote_reject_invite
(
self
,
remote_room_hosts
,
room_id
,
target
):
"""
Attempt to reject an invite for a room this server is not in. If we
fail to do so we locally mark the invite as rejected.
Args:
remote_room_hosts (list[str]): List of servers to use to try and
reject invite
room_id (str)
target (UserID): The user rejecting the invite
Returns:
Deferred[dict]: A dictionary to be returned to the client, may
include event_id etc, or nothing if we locally rejected
"""
fed_handler
=
self
.
federation_handler
try
:
ret
=
yield
fed_handler
.
do_remotely_reject_invite
(
...
...
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