mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-23 23:34:04 +01:00
Merge pull request #404 from matrix-org/markjh/trivial_rename
Rename presence_handler.send_invite
This commit is contained in:
commit
af96c6f4d3
3 changed files with 5 additions and 5 deletions
|
@ -467,7 +467,7 @@ class PresenceHandler(BaseHandler):
|
|||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def send_invite(self, observer_user, observed_user):
|
||||
def send_presence_invite(self, observer_user, observed_user):
|
||||
"""Request the presence of a local or remote user for a local user"""
|
||||
if not self.hs.is_mine(observer_user):
|
||||
raise SynapseError(400, "User is not hosted on this Home Server")
|
||||
|
|
|
@ -120,7 +120,7 @@ class PresenceListRestServlet(ClientV1RestServlet):
|
|||
if len(u) == 0:
|
||||
continue
|
||||
invited_user = UserID.from_string(u)
|
||||
yield self.handlers.presence_handler.send_invite(
|
||||
yield self.handlers.presence_handler.send_presence_invite(
|
||||
observer_user=user, observed_user=invited_user
|
||||
)
|
||||
|
||||
|
|
|
@ -365,7 +365,7 @@ class PresenceInvitesTestCase(PresenceTestCase):
|
|||
# TODO(paul): This test will likely break if/when real auth permissions
|
||||
# are added; for now the HS will always accept any invite
|
||||
|
||||
yield self.handler.send_invite(
|
||||
yield self.handler.send_presence_invite(
|
||||
observer_user=self.u_apple, observed_user=self.u_banana)
|
||||
|
||||
self.assertEquals(
|
||||
|
@ -384,7 +384,7 @@ class PresenceInvitesTestCase(PresenceTestCase):
|
|||
|
||||
@defer.inlineCallbacks
|
||||
def test_invite_local_nonexistant(self):
|
||||
yield self.handler.send_invite(
|
||||
yield self.handler.send_presence_invite(
|
||||
observer_user=self.u_apple, observed_user=self.u_durian)
|
||||
|
||||
self.assertEquals(
|
||||
|
@ -414,7 +414,7 @@ class PresenceInvitesTestCase(PresenceTestCase):
|
|||
defer.succeed((200, "OK"))
|
||||
)
|
||||
|
||||
yield self.handler.send_invite(
|
||||
yield self.handler.send_presence_invite(
|
||||
observer_user=self.u_apple, observed_user=u_rocket)
|
||||
|
||||
self.assertEquals(
|
||||
|
|
Loading…
Reference in a new issue