Apply suggestions from code review

Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
pull/8476/head
Erik Johnston 2020-10-07 09:31:06 +01:00 committed by GitHub
parent 3613071e44
commit 1a49e23555
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -2968,7 +2968,7 @@ class FederationHandler(BaseHandler):
assert self.storage.persistence
# Note that this returns the events that were persisted, which may not be
# the same as we passed in if some were deduplicated due transaction IDs.
# the same as were passed in if some were deduplicated due to transaction IDs.
events, max_stream_token = await self.storage.persistence.persist_events(
event_and_contexts, backfilled=backfilled
)

View File

@ -310,9 +310,9 @@ class EventsPersistenceStorage:
return replaced_events
# Check if any of the events have a transaction ID that has already been
# persitsed, and if so we don't persist again.
# persisted, and if so we don't persist it again.
#
# We should have checked this a long time before we get here, but its
# We should have checked this a long time before we get here, but it's
# possible that different send event requests race in such a way that
# they both pass the earlier checks.
replaced_events = await self.main_store.get_already_persisted_events(

View File

@ -60,7 +60,7 @@ class EventCreationTestCase(unittest.HomeserverTestCase):
"sender": requester.user.to_string(),
"content": {"msgtype": "m.text", "body": "Hello"},
},
token_id=4957834,
token_id=token_id,
txn_id=txn_id,
)
)