kopia lustrzana https://github.com/snarfed/bridgy-fed
rodzic
2189652a1d
commit
df75e97880
|
@ -37,7 +37,6 @@ from common import (
|
|||
PRIMARY_DOMAIN,
|
||||
PROTOCOL_DOMAINS,
|
||||
redirect_wrap,
|
||||
report_error,
|
||||
subdomain_wrap,
|
||||
unwrap,
|
||||
)
|
||||
|
|
|
@ -193,7 +193,6 @@ class ATProto(User, Protocol):
|
|||
+ tuple(as1.CRUD_VERBS)
|
||||
+ ('block', 'follow', 'like', 'share', 'stop-following')
|
||||
)
|
||||
|
||||
SUPPORTED_RECORD_TYPES = frozenset(
|
||||
type for type in itertools.chain(*FROM_AS1_TYPES.values())
|
||||
if '#' not in type)
|
||||
|
|
|
@ -26,7 +26,6 @@ from common import (
|
|||
create_task,
|
||||
global_cache,
|
||||
global_cache_timeout_policy,
|
||||
report_error,
|
||||
report_exception,
|
||||
USER_AGENT,
|
||||
)
|
||||
|
@ -276,7 +275,7 @@ def handle(limit=None):
|
|||
assert cursor
|
||||
|
||||
def _handle(op):
|
||||
if op.record['$type'] not in ATProto.SUPPORTED_RECORD_TYPES:
|
||||
if op.record and op.record['$type'] not in ATProto.SUPPORTED_RECORD_TYPES:
|
||||
logger.info(f'Skipping unsupported type {op.record["$type"]}: {json_dumps(op.record, indent=2)}')
|
||||
return
|
||||
|
||||
|
|
|
@ -472,7 +472,7 @@ class ATProtoFirehoseHandleTest(TestCase):
|
|||
|
||||
def test_delete(self, mock_create_task):
|
||||
new_commits.put(Op(repo='did:plc:user', action='delete', seq=789,
|
||||
path='app.bsky.feed.post/123', record=POST_BSKY))
|
||||
path='app.bsky.feed.post/123'))
|
||||
|
||||
handle(limit=1)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue