mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 03:04:28 +00:00
Fix the build
This commit is contained in:
parent
a7bc6fa1a2
commit
fa07450da3
2 changed files with 2 additions and 1 deletions
|
@ -95,7 +95,7 @@ class MicroblogPubBackend(Backend):
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
tasks.cache_attachments(activity.id)
|
tasks.cache_attachments.delay(activity.id)
|
||||||
if box == Box.INBOX:
|
if box == Box.INBOX:
|
||||||
tasks.process_new_activity.delay(activity.id)
|
tasks.process_new_activity.delay(activity.id)
|
||||||
|
|
||||||
|
|
1
tasks.py
1
tasks.py
|
@ -66,6 +66,7 @@ def cache_attachments(self, iri: str) -> None:
|
||||||
|
|
||||||
if actor.icon:
|
if actor.icon:
|
||||||
MEDIA_CACHE.cache(actor.icon["url"], Kind.ACTOR_ICON)
|
MEDIA_CACHE.cache(actor.icon["url"], Kind.ACTOR_ICON)
|
||||||
|
|
||||||
if activity.has_type(ap.ActivityType.CREATE):
|
if activity.has_type(ap.ActivityType.CREATE):
|
||||||
for attachment in activity.get_object()._data.get("attachment", []):
|
for attachment in activity.get_object()._data.get("attachment", []):
|
||||||
MEDIA_CACHE.cache(attachment["url"], Kind.ATTACHMENT)
|
MEDIA_CACHE.cache(attachment["url"], Kind.ATTACHMENT)
|
||||||
|
|
Loading…
Reference in a new issue