Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Add HomeServer.is_mine_server_name method
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Quah <seanq@matrix.org>
  • Loading branch information
Sean Quah committed May 5, 2023
1 parent 2e59e97 commit 476b3c6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions synapse/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@ def is_mine_id(self, string: str) -> bool:
return False
return localpart_hostname[1] == self.hostname

def is_mine_server_name(self, server_name: str) -> bool:
"""Determines whether a server name refers to this homeserver."""
return server_name == self.hostname

@cache_in_self
def get_clock(self) -> Clock:
return Clock(self._reactor)
Expand Down

0 comments on commit 476b3c6

Please sign in to comment.