Codebase list matrix-synapse / upstream/0.27.2
New upstream version 0.27.2 Erik Johnston 6 years ago
3 changed file(s) with 20 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
0 Changes in synapse v0.27.2 (2018-03-26)
1 =======================================
2
3 Bug fixes:
4
5 * Fix bug which broke TCP replication between workers (PR #3015)
6
7
08 Changes in synapse v0.27.1 (2018-03-26)
19 =======================================
210
1515 """ This is a reference implementation of a Matrix home server.
1616 """
1717
18 __version__ = "0.27.1"
18 __version__ = "0.27.2"
1818 """
1919
2020 import logging
21 import simplejson as json
21 import simplejson
2222
2323
2424 logger = logging.getLogger(__name__)
9999 return cls(
100100 stream_name,
101101 None if token == "batch" else int(token),
102 json.loads(row_json)
102 simplejson.loads(row_json)
103103 )
104104
105105 def to_line(self):
106106 return " ".join((
107107 self.stream_name,
108108 str(self.token) if self.token is not None else "batch",
109 json.dumps(self.row),
109 simplejson.dumps(self.row, namedtuple_as_object=False),
110110 ))
111111
112112
297297 def from_line(cls, line):
298298 cache_func, keys_json = line.split(" ", 1)
299299
300 return cls(cache_func, json.loads(keys_json))
301
302 def to_line(self):
303 return " ".join((self.cache_func, json.dumps(self.keys)))
300 return cls(cache_func, simplejson.loads(keys_json))
301
302 def to_line(self):
303 return " ".join((
304 self.cache_func, simplejson.dumps(self.keys, namedtuple_as_object=False)
305 ))
304306
305307
306308 class UserIpCommand(Command):
324326 def from_line(cls, line):
325327 user_id, jsn = line.split(" ", 1)
326328
327 access_token, ip, user_agent, device_id, last_seen = json.loads(jsn)
329 access_token, ip, user_agent, device_id, last_seen = simplejson.loads(jsn)
328330
329331 return cls(
330332 user_id, access_token, ip, user_agent, device_id, last_seen
331333 )
332334
333335 def to_line(self):
334 return self.user_id + " " + json.dumps((
336 return self.user_id + " " + simplejson.dumps((
335337 self.access_token, self.ip, self.user_agent, self.device_id,
336338 self.last_seen,
337339 ))