forked from forks/microblog.pub
Formatting
This commit is contained in:
parent
ad355df6c5
commit
ea6be0ed8e
5 changed files with 9 additions and 4 deletions
3
.isort.cfg
Normal file
3
.isort.cfg
Normal file
|
@ -0,0 +1,3 @@
|
|||
[settings]
|
||||
line_length=120
|
||||
force_single_line=true
|
2
app.py
2
app.py
|
@ -75,8 +75,8 @@ from config import VERSION
|
|||
from config import _drop_db
|
||||
from config import custom_cache_purge_hook
|
||||
from utils.key import get_secret_key
|
||||
from utils.media import Kind
|
||||
from utils.lookup import lookup
|
||||
from utils.media import Kind
|
||||
|
||||
back = activitypub.MicroblogPubBackend()
|
||||
|
||||
|
|
3
tasks.py
3
tasks.py
|
@ -72,7 +72,8 @@ def cache_actor(self, iri: str, also_cache_attachments: bool = True) -> None:
|
|||
|
||||
# Cache the actor info
|
||||
DB.activities.update_one(
|
||||
{"remote_id": iri}, {"$set": {"meta.actor": activitypub._actor_to_meta(actor)}}
|
||||
{"remote_id": iri},
|
||||
{"$set": {"meta.actor": activitypub._actor_to_meta(actor)}},
|
||||
)
|
||||
|
||||
log.info(f"actor cached for {iri}")
|
||||
|
|
|
@ -172,6 +172,7 @@
|
|||
|
||||
{% macro display_thread(thread, likes=[], shares=[]) -%}
|
||||
{% for reply in thread %}
|
||||
{{ reply }}
|
||||
{% if reply._requested %}
|
||||
{{ display_note(reply.activity.object, perma=True, ui=False, likes=likes, shares=shares, meta=reply.meta) }}
|
||||
{% else %}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import little_boxes.activitypub as ap
|
||||
import json
|
||||
import requests
|
||||
|
||||
import little_boxes.activitypub as ap
|
||||
import mf2py
|
||||
import requests
|
||||
|
||||
|
||||
def lookup(url: str) -> ap.BaseActivity:
|
||||
|
|
Loading…
Reference in a new issue