summary refs log tree commit diff
path: root/synapse/federation/units.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-10-17 17:12:25 +0100
committerMark Haines <mark.haines@matrix.org>2014-10-17 17:12:25 +0100
commitf5cf7ac25b311fda8a2d553f07437b3648c66f6c (patch)
tree62d43c8acf91281f59239f331745e9796a0f827e /synapse/federation/units.py
parentSPEC-7: Don't stamp event contents with 'hsob_ts' (diff)
downloadsynapse-f5cf7ac25b311fda8a2d553f07437b3648c66f6c.tar.xz
SPEC-7: Rename 'ts' to 'origin_server_ts'
Diffstat (limited to 'synapse/federation/units.py')
-rw-r--r--synapse/federation/units.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/synapse/federation/units.py b/synapse/federation/units.py
index d97aeb698e..dccac2aca7 100644
--- a/synapse/federation/units.py
+++ b/synapse/federation/units.py
@@ -40,7 +40,7 @@ class Pdu(JsonEncodedObject):
 
         {
             "pdu_id": "78c",
-            "ts": 1404835423000,
+            "origin_server_ts": 1404835423000,
             "origin": "bar",
             "prev_ids": [
                 ["23b", "foo"],
@@ -55,7 +55,7 @@ class Pdu(JsonEncodedObject):
         "pdu_id",
         "context",
         "origin",
-        "ts",
+        "origin_server_ts",
         "pdu_type",
         "destinations",
         "transaction_id",
@@ -82,7 +82,7 @@ class Pdu(JsonEncodedObject):
         "pdu_id",
         "context",
         "origin",
-        "ts",
+        "origin_server_ts",
         "pdu_type",
         "content",
     ]
@@ -186,7 +186,7 @@ class Transaction(JsonEncodedObject):
         "transaction_id",
         "origin",
         "destination",
-        "ts",
+        "origin_server_ts",
         "previous_ids",
         "pdus",
         "edus",
@@ -203,7 +203,7 @@ class Transaction(JsonEncodedObject):
         "transaction_id",
         "origin",
         "destination",
-        "ts",
+        "origin_server_ts",
         "pdus",
     ]
 
@@ -225,10 +225,10 @@ class Transaction(JsonEncodedObject):
     @staticmethod
     def create_new(pdus, **kwargs):
         """ Used to create a new transaction. Will auto fill out
-        transaction_id and ts keys.
+        transaction_id and origin_server_ts keys.
         """
-        if "ts" not in kwargs:
-            raise KeyError("Require 'ts' to construct a Transaction")
+        if "origin_server_ts" not in kwargs:
+            raise KeyError("Require 'origin_server_ts' to construct a Transaction")
         if "transaction_id" not in kwargs:
             raise KeyError(
                 "Require 'transaction_id' to construct a Transaction"