summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-24 15:27:59 +0100
committerErik Johnston <erik@matrix.org>2014-09-24 15:27:59 +0100
commit70899d3ab29cd57301fb135130c940f312bfe482 (patch)
tree69383590001210f59f429ffb88c6afda4c26d789 /synapse/rest
parentMake deleting deletes not undelete (diff)
downloadsynapse-70899d3ab29cd57301fb135130c940f312bfe482.tar.xz
Rename deletions to redactions
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/room.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/synapse/rest/room.py b/synapse/rest/room.py
index 85a1d2eae3..399084ae2a 100644
--- a/synapse/rest/room.py
+++ b/synapse/rest/room.py
@@ -19,7 +19,7 @@ from twisted.internet import defer
 from base import RestServlet, client_path_pattern
 from synapse.api.errors import SynapseError, Codes
 from synapse.streams.config import PaginationConfig
-from synapse.api.events.room import RoomMemberEvent, RoomDeletionEvent
+from synapse.api.events.room import RoomMemberEvent, RoomRedactionEvent
 from synapse.api.constants import Membership
 
 import json
@@ -430,9 +430,9 @@ class RoomMembershipRestServlet(RestServlet):
         self.txns.store_client_transaction(request, txn_id, response)
         defer.returnValue(response)
 
-class RoomDeleteEventRestServlet(RestServlet):
+class RoomRedactEventRestServlet(RestServlet):
     def register(self, http_server):
-        PATTERN = ("/rooms/(?P<room_id>[^/]*)/delete/(?P<event_id>[^/]*)")
+        PATTERN = ("/rooms/(?P<room_id>[^/]*)/redact/(?P<event_id>[^/]*)")
         register_txn_path(self, PATTERN, http_server)
 
     @defer.inlineCallbacks
@@ -441,11 +441,11 @@ class RoomDeleteEventRestServlet(RestServlet):
         content = _parse_json(request)
 
         event = self.event_factory.create_event(
-            etype=RoomDeletionEvent.TYPE,
+            etype=RoomRedactionEvent.TYPE,
             room_id=urllib.unquote(room_id),
             user_id=user.to_string(),
             content=content,
-            deletes=event_id,
+            redacts=event_id,
         )
 
         msg_handler = self.handlers.message_handler
@@ -520,4 +520,4 @@ def register_servlets(hs, http_server):
     PublicRoomListRestServlet(hs).register(http_server)
     RoomStateRestServlet(hs).register(http_server)
     RoomInitialSyncRestServlet(hs).register(http_server)
-    RoomDeleteEventRestServlet(hs).register(http_server)
+    RoomRedactEventRestServlet(hs).register(http_server)