mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 21:44:52 -04:00
Remove redundant token_id
parameter to create_event
this is always the same as requester.access_token_id.
This commit is contained in:
parent
629a951b49
commit
d9d86c2996
4 changed files with 3 additions and 8 deletions
|
@ -437,7 +437,6 @@ class EventCreationHandler:
|
|||
self,
|
||||
requester: Requester,
|
||||
event_dict: dict,
|
||||
token_id: Optional[str] = None,
|
||||
txn_id: Optional[str] = None,
|
||||
prev_event_ids: Optional[List[str]] = None,
|
||||
require_consent: bool = True,
|
||||
|
@ -453,7 +452,6 @@ class EventCreationHandler:
|
|||
Args:
|
||||
requester
|
||||
event_dict: An entire event
|
||||
token_id
|
||||
txn_id
|
||||
prev_event_ids:
|
||||
the forward extremities to use as the prev_events for the
|
||||
|
@ -511,8 +509,8 @@ class EventCreationHandler:
|
|||
if require_consent and not is_exempt:
|
||||
await self.assert_accepted_privacy_policy(requester)
|
||||
|
||||
if token_id is not None:
|
||||
builder.internal_metadata.token_id = token_id
|
||||
if requester.access_token_id is not None:
|
||||
builder.internal_metadata.token_id = requester.access_token_id
|
||||
|
||||
if txn_id is not None:
|
||||
builder.internal_metadata.txn_id = txn_id
|
||||
|
@ -726,7 +724,7 @@ class EventCreationHandler:
|
|||
return event, event.internal_metadata.stream_ordering
|
||||
|
||||
event, context = await self.create_event(
|
||||
requester, event_dict, token_id=requester.access_token_id, txn_id=txn_id
|
||||
requester, event_dict, txn_id=txn_id
|
||||
)
|
||||
|
||||
assert self.hs.is_mine_id(event.sender), "User must be our own: %s" % (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue