summary refs log tree commit diff
path: root/synapse/events
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/events')
-rw-r--r--synapse/events/__init__.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py
index bcb8f33a58..8c71aeb5e4 100644
--- a/synapse/events/__init__.py
+++ b/synapse/events/__init__.py
@@ -36,6 +36,15 @@ class _EventInternalMetadata(object):
     def is_invite_from_remote(self):
         return getattr(self, "invite_from_remote", False)
 
+    def get_send_on_behalf_of(self):
+        """Whether this server should send the event on behalf of another server.
+        This is used by the federation "send_join" API to forward the initial join
+        event for a server in the room.
+
+        returns a str with the name of the server this event is sent on behalf of.
+        """
+        return getattr(self, "get_send_on_behalf_of", None)
+
 
 def _event_dict_property(key):
     def getter(self):