ATProto poll notifs: limit 100 for protocol bot users

try to make sure we don't miss any follows until we switch to firehose in #978

for https://github.com/snarfed/bridgy-fed/issues/997
pull/1020/head
Ryan Barrett 2024-05-04 08:42:44 -07:00
rodzic 9a0e278004
commit 832b7a0276
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -627,9 +627,12 @@ def poll_notifications():
client.session['accessJwt'] = service_jwt(os.environ['APPVIEW_HOST'],
repo_did=did,
privkey=repo.signing_key)
resp = client.app.bsky.notification.listNotifications(
cursor=user.atproto_notifs_cursor,
limit=10)
# higher limit for protocol bot users to try to make sure we don't
# miss any follows
limit=100 if Protocol.for_bridgy_subdomain(user.handle) else 10)
for notif in resp['notifications']:
actor_did = notif['author']['did']