From e85f0477cd9a4e46459adb530f8823655ad49418 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Tue, 16 Apr 2019 23:00:15 +0200 Subject: [PATCH] Fix formatting --- activitypub.py | 14 ++++++++------ app.py | 4 +--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/activitypub.py b/activitypub.py index f45aad9..a9fe006 100644 --- a/activitypub.py +++ b/activitypub.py @@ -369,12 +369,14 @@ class MicroblogPubBackend(Backend): logger.info(f"inbox_delete handle_replies obj={obj!r}") in_reply_to = obj.get_in_reply_to() if delete.get_object().ACTIVITY_TYPE != ap.ActivityType.NOTE: - in_reply_to = ap._get_id(DB.activities.find_one( - { - "activity.object.id": delete.get_object().id, - "type": ap.ActivityType.CREATE.value, - } - )["activity"]["object"].get("inReplyTo")) + in_reply_to = ap._get_id( + DB.activities.find_one( + { + "activity.object.id": delete.get_object().id, + "type": ap.ActivityType.CREATE.value, + } + )["activity"]["object"].get("inReplyTo") + ) # Fake a Undo so any related Like/Announce doesn't appear on the web UI DB.activities.update( diff --git a/app.py b/app.py index 27e47dd..c647c07 100644 --- a/app.py +++ b/app.py @@ -2703,9 +2703,7 @@ def task_process_new_activity(): tag_stream = True # FIXME(tsileo): check for direct addressing in the to, cc, bcc... fields - if (in_reply_to and in_reply_to.startswith(ID)) or note.has_mention( - ID - ): + if (in_reply_to and in_reply_to.startswith(ID)) or note.has_mention(ID): should_keep = True if in_reply_to: