[mastodon] Also dismiss notifications which have no status

This commit is contained in:
missytake 2023-03-19 20:29:25 +01:00
parent f7d9baa8a3
commit 64715f5aa5

View file

@ -63,6 +63,7 @@ class MastodonBot(Censor):
try: try:
status_id = int(status["status"]["id"]) status_id = int(status["status"]["id"])
except KeyError: except KeyError:
self.account.notifications_dismiss(status["id"])
continue # ignore notifications which don't have a status continue # ignore notifications which don't have a status
text = re.sub(r"<[^>]*>", "", status["status"]["content"]) text = re.sub(r"<[^>]*>", "", status["status"]["content"])
text = re.sub( text = re.sub(