mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 03:04:28 +00:00
Handle reply of articles
This commit is contained in:
parent
7df8837b34
commit
665e185407
2 changed files with 3 additions and 3 deletions
2
Makefile
2
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
|
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:
|
reload-dev:
|
||||||
docker build . -t microblogpub:latest
|
# docker build . -t microblogpub:latest
|
||||||
docker-compose -f docker-compose-dev.yml up -d --force-recreate
|
docker-compose -f docker-compose-dev.yml up -d --force-recreate
|
||||||
|
|
||||||
update:
|
update:
|
||||||
|
|
|
@ -463,7 +463,7 @@ class MicroblogPubBackend(Backend):
|
||||||
|
|
||||||
new_threads = []
|
new_threads = []
|
||||||
root_reply = in_reply_to
|
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(
|
creply = DB.activities.find_one_and_update(
|
||||||
{"activity.object.id": in_reply_to},
|
{"activity.object.id": in_reply_to},
|
||||||
|
@ -479,7 +479,7 @@ class MicroblogPubBackend(Backend):
|
||||||
if not in_reply_to:
|
if not in_reply_to:
|
||||||
break
|
break
|
||||||
root_reply = in_reply_to
|
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}
|
q = {"activity.object.id": root_reply}
|
||||||
if not DB.activities.count(q):
|
if not DB.activities.count(q):
|
||||||
self.save(Box.REPLIES, reply)
|
self.save(Box.REPLIES, reply)
|
||||||
|
|
Loading…
Reference in a new issue