Codebase list matrix-synapse / 0b13fdb
Imported Upstream version 0.22.1 Erik Johnston 6 years ago
5 changed file(s) with 21 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
0 Changes in synapse v0.22.1 (2017-07-06)
1 =======================================
2
3 Bug fixes:
4
5 * Fix bug where pusher pool didn't start and caused issues when
6 interacting with some rooms (PR #2342)
7
8
09 Changes in synapse v0.22.0 (2017-07-06)
110 =======================================
211
1515 """ This is a reference implementation of a Matrix home server.
1616 """
1717
18 __version__ = "0.22.0"
18 __version__ = "0.22.1"
7575 self.keyring = hs.get_keyring()
7676 self.action_generator = hs.get_action_generator()
7777 self.is_mine_id = hs.is_mine_id
78 self.pusher_pool = hs.get_pusherpool()
7879
7980 self.replication_layer.set_handler(self)
8081
14251426 if not backfilled:
14261427 # this intentionally does not yield: we don't care about the result
14271428 # and don't need to wait for it.
1428 preserve_fn(self.hs.get_pusherpool().on_new_notifications)(
1429 preserve_fn(self.pusher_pool.on_new_notifications)(
14291430 event_stream_id, max_stream_id
14301431 )
14311432
4848 self.validator = EventValidator()
4949
5050 self.pagination_lock = ReadWriteLock()
51
52 self.pusher_pool = hs.get_pusherpool()
5153
5254 # We arbitrarily limit concurrent event creation for a room to 5.
5355 # This is to stop us from diverging history *too* much.
609611
610612 # this intentionally does not yield: we don't care about the result
611613 # and don't need to wait for it.
612 preserve_fn(self.hs.get_pusherpool().on_new_notifications)(
614 preserve_fn(self.pusher_pool.on_new_notifications)(
613615 event_stream_id, max_stream_id
614616 )
615617
7272 def __init__(self, hs):
7373 super(PushersSetRestServlet, self).__init__(hs)
7474 self.notifier = hs.get_notifier()
75 self.pusher_pool = self.hs.get_pusherpool()
7576
7677 @defer.inlineCallbacks
7778 def on_POST(self, request):
8081
8182 content = parse_json_object_from_request(request)
8283
83 pusher_pool = self.hs.get_pusherpool()
84
8584 if ('pushkey' in content and 'app_id' in content
8685 and 'kind' in content and
8786 content['kind'] is None):
88 yield pusher_pool.remove_pusher(
87 yield self.pusher_pool.remove_pusher(
8988 content['app_id'], content['pushkey'], user_id=user.to_string()
9089 )
9190 defer.returnValue((200, {}))
108107 append = content['append']
109108
110109 if not append:
111 yield pusher_pool.remove_pushers_by_app_id_and_pushkey_not_user(
110 yield self.pusher_pool.remove_pushers_by_app_id_and_pushkey_not_user(
112111 app_id=content['app_id'],
113112 pushkey=content['pushkey'],
114113 not_user_id=user.to_string()
115114 )
116115
117116 try:
118 yield pusher_pool.add_pusher(
117 yield self.pusher_pool.add_pusher(
119118 user_id=user.to_string(),
120119 access_token=requester.access_token_id,
121120 kind=content['kind'],
151150 self.hs = hs
152151 self.notifier = hs.get_notifier()
153152 self.auth = hs.get_v1auth()
153 self.pusher_pool = self.hs.get_pusherpool()
154154
155155 @defer.inlineCallbacks
156156 def on_GET(self, request):
160160 app_id = parse_string(request, "app_id", required=True)
161161 pushkey = parse_string(request, "pushkey", required=True)
162162
163 pusher_pool = self.hs.get_pusherpool()
164
165163 try:
166 yield pusher_pool.remove_pusher(
164 yield self.pusher_pool.remove_pusher(
167165 app_id=app_id,
168166 pushkey=pushkey,
169167 user_id=user.to_string(),