mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 20:24:51 -04:00
Implemented /rooms/$roomid/[invite|join|leave] with POST / PUT (incl txn ids)
This commit is contained in:
parent
732d954f89
commit
5c0be8fde3
2 changed files with 35 additions and 8 deletions
|
@ -41,6 +41,7 @@ class HttpTransactionStore(object):
|
|||
logger.debug("get_response Key: %s TxnId: %s", key, txn_id)
|
||||
(last_txn_id, response) = self.transactions[key]
|
||||
if txn_id == last_txn_id:
|
||||
logger.info("get_response: Returning a response for %s", key)
|
||||
return response
|
||||
except KeyError:
|
||||
pass
|
||||
|
@ -78,11 +79,13 @@ class HttpTransactionStore(object):
|
|||
request must have the transaction ID as the last path segment.
|
||||
txn_id (str): The transaction ID for this request.
|
||||
Returns:
|
||||
The response tuple or (None, None).
|
||||
The response tuple.
|
||||
Raises:
|
||||
KeyError if the transaction was not found.
|
||||
"""
|
||||
response = self.get_response(self._get_key(request), txn_id)
|
||||
if response is None:
|
||||
return (None, None)
|
||||
raise KeyError("Transaction not found.")
|
||||
return response
|
||||
|
||||
def _get_key(self, request):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue