diff options
author | Matthew Hodgson <matthew@matrix.org> | 2018-01-04 19:10:35 +0000 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2018-01-04 19:10:35 +0000 |
commit | f512e5c1378bd78f99959795c657d04dc742b237 (patch) | |
tree | 906ae8f6eeaddaea078b5480811e0f88bc33d593 | |
parent | Merge pull request #2683 from seckrv/fix_pwd_auth_prov_typo (diff) | |
download | synapse-f512e5c1378bd78f99959795c657d04dc742b237.tar.xz |
entirely blindly implement ?ts for AS. untested
-rw-r--r-- | synapse/rest/client/v1/room.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py index 75b735b47d..19a317930f 100644 --- a/synapse/rest/client/v1/room.py +++ b/synapse/rest/client/v1/room.py @@ -195,15 +195,20 @@ class RoomSendEventRestServlet(ClientV1RestServlet): requester = yield self.auth.get_user_by_req(request, allow_guest=True) content = parse_json_object_from_request(request) + event_dict = { + "type": event_type, + "content": content, + "room_id": room_id, + "sender": requester.user.to_string(), + } + + if request.args['ts'] and requester.app_service: + event_dict['origin_server_ts'] = parse_integer(request, "ts", 0) + msg_handler = self.handlers.message_handler event = yield msg_handler.create_and_send_nonmember_event( requester, - { - "type": event_type, - "content": content, - "room_id": room_id, - "sender": requester.user.to_string(), - }, + event_dict, txn_id=txn_id, ) |