mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-11-25 08:38:59 +00:00
less error spam
This commit is contained in:
parent
d06f89ed3f
commit
fa60a6569d
1 changed files with 9 additions and 6 deletions
|
@ -258,9 +258,12 @@ def push(id):
|
||||||
'privkey': int(bot[0].rstrip("\0")),
|
'privkey': int(bot[0].rstrip("\0")),
|
||||||
'auth': bot[1]
|
'auth': bot[1]
|
||||||
}
|
}
|
||||||
push_object = client.push_subscription_decrypt_push(request.data, params, request.headers['Encryption'], request.headers['Crypto-Key'])
|
try:
|
||||||
notification = client.notifications(id = push_object['notification_id'])
|
push_object = client.push_subscription_decrypt_push(request.data, params, request.headers['Encryption'], request.headers['Crypto-Key'])
|
||||||
me = client.account_verify_credentials()['id']
|
notification = client.notifications(id = push_object['notification_id'])
|
||||||
|
me = client.account_verify_credentials()['id']
|
||||||
|
except:
|
||||||
|
return "Push failed - do we still have access to {}?".format(id)
|
||||||
|
|
||||||
# first, check how many times the bot has posted in this thread.
|
# first, check how many times the bot has posted in this thread.
|
||||||
# if it's over 15, don't reply.
|
# if it's over 15, don't reply.
|
||||||
|
|
Loading…
Reference in a new issue