summary refs log tree commit diff
path: root/synapse/api/events
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/api/events')
-rw-r--r--synapse/api/events/__init__.py4
-rw-r--r--synapse/api/events/factory.py4
-rw-r--r--synapse/api/events/room.py6
-rw-r--r--synapse/api/events/utils.py4
4 files changed, 9 insertions, 9 deletions
diff --git a/synapse/api/events/__init__.py b/synapse/api/events/__init__.py
index d68629209d..0ceb703c74 100644
--- a/synapse/api/events/__init__.py
+++ b/synapse/api/events/__init__.py
@@ -59,7 +59,7 @@ class SynapseEvent(JsonEncodedObject):
         "age_ts",
         "prev_content",
         "prev_state",
-        "pruned_because",
+        "redacted_because",
     ]
 
     internal_keys = [
@@ -70,7 +70,7 @@ class SynapseEvent(JsonEncodedObject):
         "origin",
         "outlier",
         "power_level",
-        "deleted",
+        "redacted",
     ]
 
     required_keys = [
diff --git a/synapse/api/events/factory.py b/synapse/api/events/factory.py
index c65ea8372b..0d94850cec 100644
--- a/synapse/api/events/factory.py
+++ b/synapse/api/events/factory.py
@@ -18,7 +18,7 @@ from synapse.api.events.room import (
     InviteJoinEvent, RoomConfigEvent, RoomNameEvent, GenericEvent,
     RoomPowerLevelsEvent, RoomJoinRulesEvent, RoomOpsPowerLevelsEvent,
     RoomCreateEvent, RoomAddStateLevelEvent, RoomSendEventLevelEvent,
-    RoomDeletionEvent,
+    RoomRedactionEvent,
 )
 
 from synapse.util.stringutils import random_string
@@ -40,7 +40,7 @@ class EventFactory(object):
         RoomAddStateLevelEvent,
         RoomSendEventLevelEvent,
         RoomOpsPowerLevelsEvent,
-        RoomDeletionEvent,
+        RoomRedactionEvent,
     ]
 
     def __init__(self, hs):
diff --git a/synapse/api/events/room.py b/synapse/api/events/room.py
index 9861395556..cd936074fc 100644
--- a/synapse/api/events/room.py
+++ b/synapse/api/events/room.py
@@ -182,10 +182,10 @@ class RoomAliasesEvent(SynapseStateEvent):
         return {}
 
 
-class RoomDeletionEvent(SynapseEvent):
-    TYPE = "m.room.deletion"
+class RoomRedactionEvent(SynapseEvent):
+    TYPE = "m.room.redaction"
 
-    valid_keys = SynapseEvent.valid_keys + ["deletes"]
+    valid_keys = SynapseEvent.valid_keys + ["redacts"]
 
     def get_content_template(self):
         return {}
diff --git a/synapse/api/events/utils.py b/synapse/api/events/utils.py
index 3d8b9a1db1..c3a32be8c1 100644
--- a/synapse/api/events/utils.py
+++ b/synapse/api/events/utils.py
@@ -23,7 +23,7 @@ def prune_event(event):
     """ Prunes the given event of all keys we don't know about or think could
     potentially be dodgy.
 
-    This is used when we "delete" an event. We want to remove all fields that
+    This is used when we "redact" an event. We want to remove all fields that
     the user has specified, but we do want to keep necessary information like
     type, state_key etc.
     """
@@ -55,7 +55,7 @@ def prune_event(event):
     elif event.type == RoomSendEventLevelEvent.TYPE:
         add_fields("level")
     elif event.type == RoomOpsPowerLevelsEvent.TYPE:
-        add_fields("kick_level", "ban_level", "delete_level")
+        add_fields("kick_level", "ban_level", "redact_level")
     elif event.type == RoomAliasesEvent.TYPE:
         add_fields("aliases")