summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-01-27 16:53:59 +0000
committerKegan Dougal <kegan@matrix.org>2015-01-27 16:53:59 +0000
commit92171f9dd1ecac24aeae2f46729f3cbbbe94f91e (patch)
tree5416bc62f0c44d52c830b9fa848d9307f54ff828 /synapse/handlers
parentAdd AS specific classes with docstrings. (diff)
downloadsynapse-92171f9dd1ecac24aeae2f46729f3cbbbe94f91e.tar.xz
Add stub methods, TODOs and docstrings for application services.
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/appservice.py25
1 files changed, 22 insertions, 3 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py
index 55a653476f..25e1cece56 100644
--- a/synapse/handlers/appservice.py
+++ b/synapse/handlers/appservice.py
@@ -42,8 +42,27 @@ class ApplicationServicesHandler(BaseHandler):
                 "Consult the home server admin."
             )
 
-        # update AS entry with base URL
-
-        # store namespaces for this AS
+        # store this AS
 
         defer.returnValue("not_implemented_yet")
+
+    def unregister(self, token):
+        yield self.store.unregister_app_service(token)
+
+    def notify_interested_services(self, event):
+        """Notifies (pushes) all application services interested in this event.
+
+        Pushing is done asynchronously, so this method won't block for any
+        prolonged length of time.
+
+        Args:
+            event(Event): The event to push out to interested services.
+        """
+        # TODO: Gather interested services
+        #         get_services_for_event(event) <-- room IDs and user IDs
+        #         Get a list of room aliases. Check regex.
+        # TODO: If unknown user: poke User Query API.
+        # TODO: If unknown room alias: poke Room Alias Query API.
+
+        # TODO: Fork off pushes to these services - XXX First cut, best effort
+        pass