diff --git a/atproto_firehose.py b/atproto_firehose.py index 9141ea70..9bc598be 100644 --- a/atproto_firehose.py +++ b/atproto_firehose.py @@ -206,9 +206,8 @@ def subscribe(): logger.debug(f'Got {t[1:]} {repo}') commits.put(Op(action='account', repo=repo, seq=seq, time=cur_timestamp)) - continue + continue - assert t == '#commit' blocks = {} # maps base32 str CID to dict block if block_bytes := payload.get('blocks'): _, blocks = libipld.decode_car(block_bytes) diff --git a/tests/test_atproto_firehose.py b/tests/test_atproto_firehose.py index f2a30006..d81691ab 100644 --- a/tests/test_atproto_firehose.py +++ b/tests/test_atproto_firehose.py @@ -369,6 +369,22 @@ class ATProtoFirehoseSubscribeTest(ATProtoTestCase): commits.get()) self.assertTrue(commits.empty()) + def test_account_event_user_not_bridged(self): + time = NOW.isoformat() + + FakeWebsocketClient.to_receive = [({ + 'op': 1, + 't': '#account', + }, { + 'seq': 789, + 'did': 'did:plc:nope', + 'time': time, + })] + + self.subscribe() + + self.assertTrue(commits.empty()) + def test_uncaught_exception_skips_commit(self): self.cursor.cursor = 1 self.cursor.put()