support server notice state events for resource limits

This commit is contained in:
Neil Johnson 2018-08-14 11:20:41 +01:00
parent 63417c31e9
commit 9b75c78b4d
4 changed files with 22 additions and 8 deletions

View file

@ -46,7 +46,7 @@ class ServerNoticesManager(object):
return self._config.server_notices_mxid is not None
@defer.inlineCallbacks
def send_notice(self, user_id, event_content):
def send_notice(self, user_id, event_content, type):
"""Send a notice to the given user
Creates the server notices room, if none exists.
@ -67,7 +67,7 @@ class ServerNoticesManager(object):
yield self._event_creation_handler.create_and_send_nonmember_event(
requester, {
"type": EventTypes.Message,
"type": type,
"room_id": room_id,
"sender": system_mxid,
"content": event_content,