mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 03:04:28 +00:00
Code cleanup
This commit is contained in:
parent
2836959d92
commit
5ea5db604b
2 changed files with 5 additions and 6 deletions
|
@ -9,7 +9,6 @@ from typing import Union
|
||||||
from little_boxes import activitypub as ap
|
from little_boxes import activitypub as ap
|
||||||
|
|
||||||
_SubQuery = Dict[str, Any]
|
_SubQuery = Dict[str, Any]
|
||||||
_Meta = Dict["MetaKey", Any]
|
|
||||||
|
|
||||||
|
|
||||||
@unique
|
@unique
|
||||||
|
|
|
@ -146,11 +146,11 @@ def _build_thread(data, include_children=True, query=None): # noqa: C901
|
||||||
query = {}
|
query = {}
|
||||||
data["_requested"] = True
|
data["_requested"] = True
|
||||||
app.logger.info(f"_build_thread({data!r})")
|
app.logger.info(f"_build_thread({data!r})")
|
||||||
root_id = data["meta"].get(MetaKey.THREAD_ROOT_PARENT.value)
|
root_id = (
|
||||||
if not root_id:
|
data["meta"].get(MetaKey.THREAD_ROOT_PARENT.value)
|
||||||
root_id = data["meta"].get(MetaKey.OBJECT_ID.value)
|
or data["meta"].get(MetaKey.OBJECT_ID.value)
|
||||||
if not root_id:
|
or data["remote_id"]
|
||||||
root_id = data["remote_id"]
|
)
|
||||||
|
|
||||||
replies = [data]
|
replies = [data]
|
||||||
for dat in find_activities(
|
for dat in find_activities(
|
||||||
|
|
Loading…
Reference in a new issue