From f784980d2b2bd3827bfef94b0360582b2ef228ba Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Thu, 5 Jan 2017 11:26:30 +0000 Subject: Only send events that originate on this server. Or events that are sent via the federation "send_join" API. This should match the behaviour from before v0.18.5 and #1635 landed. --- synapse/events/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'synapse/events') 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): -- cgit 1.4.1