summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-12-16 16:07:41 +0000
committerMark Haines <mark.haines@matrix.org>2014-12-16 16:07:41 +0000
commit627e4f01d2bf2516ddb3f8737bb682753e9c21f1 (patch)
treeac47504575a32390cd89455049d45d5f7bb5b510 /synapse/handlers/message.py
parentConstruct the EventContext in the state handler rather than constructing one ... (diff)
downloadsynapse-627e4f01d2bf2516ddb3f8737bb682753e9c21f1.tar.xz
Remove send_message since nothing was calling it. Remove Snapshot because only send_message was using it
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r--synapse/handlers/message.py38
1 files changed, 0 insertions, 38 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index baf372fdad..b529d890bb 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -18,8 +18,6 @@ from twisted.internet import defer
 from synapse.api.constants import EventTypes, Membership
 from synapse.api.errors import RoomError
 from synapse.streams.config import PaginationConfig
-from synapse.util.logcontext import PreserveLoggingContext
-
 from synapse.events.validator import EventValidator
 
 from ._base import BaseHandler
@@ -67,35 +65,6 @@ class MessageHandler(BaseHandler):
         defer.returnValue(None)
 
     @defer.inlineCallbacks
-    def send_message(self, event=None, suppress_auth=False):
-        """ Send a message.
-
-        Args:
-            event : The message event to store.
-            suppress_auth (bool) : True to suppress auth for this message. This
-            is primarily so the home server can inject messages into rooms at
-            will.
-        Raises:
-            SynapseError if something went wrong.
-        """
-
-        self.ratelimit(event.user_id)
-        # TODO(paul): Why does 'event' not have a 'user' object?
-        user = self.hs.parse_userid(event.user_id)
-        assert self.hs.is_mine(user), "User must be our own: %s" % (user,)
-
-        snapshot = yield self.store.snapshot_room(event)
-
-        yield self._on_new_room_event(
-            event, snapshot, suppress_auth=suppress_auth
-        )
-
-        with PreserveLoggingContext():
-            self.hs.get_handlers().presence_handler.bump_presence_active_time(
-                user
-            )
-
-    @defer.inlineCallbacks
     def get_messages(self, user_id=None, room_id=None, pagin_config=None,
                      feedback=False):
         """Get messages in a room.
@@ -213,13 +182,6 @@ class MessageHandler(BaseHandler):
         defer.returnValue(None)
 
     @defer.inlineCallbacks
-    def send_feedback(self, event):
-        snapshot = yield self.store.snapshot_room(event)
-
-        # store message in db
-        yield self._on_new_room_event(event, snapshot)
-
-    @defer.inlineCallbacks
     def get_state_events(self, user_id, room_id):
         """Retrieve all state events for a given room.