mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2025-06-05 21:59:23 +02:00
UI improvements
This commit is contained in:
10
app/boxes.py
10
app/boxes.py
@ -237,6 +237,11 @@ def send_create(
|
||||
raise ValueError("Object has no context")
|
||||
context = in_reply_to_object.ap_context
|
||||
|
||||
if in_reply_to_object.is_from_outbox:
|
||||
db.query(models.OutboxObject).filter(
|
||||
models.OutboxObject.ap_id == in_reply_to,
|
||||
).update({"replies_count": models.OutboxObject.replies_count + 1})
|
||||
|
||||
for (upload, filename) in uploads:
|
||||
attachments.append(upload_to_attachment(upload, filename))
|
||||
|
||||
@ -501,6 +506,11 @@ def _handle_create_activity(
|
||||
logger.info(f"Invalid tags: {tags}")
|
||||
return None
|
||||
|
||||
if created_object.in_reply_to and created_object.in_reply_to.startswith(BASE_URL):
|
||||
db.query(models.OutboxObject).filter(
|
||||
models.OutboxObject.ap_id == created_object.in_reply_to,
|
||||
).update({"replies_count": models.OutboxObject.replies_count + 1})
|
||||
|
||||
for tag in tags:
|
||||
if tag.get("name") == LOCAL_ACTOR.handle or tag.get("href") == LOCAL_ACTOR.url:
|
||||
notif = models.Notification(
|
||||
|
Reference in New Issue
Block a user