From 665e185407cc7d5a84dc5e7ad2fbc857713a4095 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Thu, 6 Sep 2018 19:19:47 +0200 Subject: [PATCH] Handle reply of articles --- Makefile | 2 +- activitypub.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6c7a767..daad832 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ reload-fed: WEB_PORT=5007 CONFIG_DIR=./tests/fixtures/instance2/config docker-compose -p instance2 -f docker-compose-tests.yml up -d --force-recreate --build reload-dev: - docker build . -t microblogpub:latest + # docker build . -t microblogpub:latest docker-compose -f docker-compose-dev.yml up -d --force-recreate update: diff --git a/activitypub.py b/activitypub.py index c7425dd..c53aaa8 100644 --- a/activitypub.py +++ b/activitypub.py @@ -463,7 +463,7 @@ class MicroblogPubBackend(Backend): new_threads = [] root_reply = in_reply_to - reply = ap.fetch_remote_activity(root_reply, expected=ap.ActivityType.NOTE) + reply = ap.fetch_remote_activity(root_reply) creply = DB.activities.find_one_and_update( {"activity.object.id": in_reply_to}, @@ -479,7 +479,7 @@ class MicroblogPubBackend(Backend): if not in_reply_to: break root_reply = in_reply_to - reply = ap.fetch_remote_activity(root_reply, expected=ap.ActivityType.NOTE) + reply = ap.fetch_remote_activity(root_reply) q = {"activity.object.id": root_reply} if not DB.activities.count(q): self.save(Box.REPLIES, reply)