diff --git a/app/boxes.py b/app/boxes.py index b879f8e..6c26385 100644 --- a/app/boxes.py +++ b/app/boxes.py @@ -617,6 +617,14 @@ def save_to_inbox(db: Session, raw_object: ap.RawObject) -> None: "Received an Accept for an unsupported activity: " f"{relates_to_outbox_object.ap_type}" ) + elif ra.ap_type == "EmojiReact": + if not relates_to_outbox_object: + logger.info( + f"Received a like for an unknown activity: {ra.activity_object_ap_id}" + ) + else: + # TODO(ts): support reactions + pass elif ra.ap_type == "Like": if not relates_to_outbox_object: logger.info( diff --git a/app/models.py b/app/models.py index c4aefb2..89fb6c7 100644 --- a/app/models.py +++ b/app/models.py @@ -150,6 +150,7 @@ class OutboxObject(Base, BaseObject): likes_count = Column(Integer, nullable=False, default=0) announces_count = Column(Integer, nullable=False, default=0) replies_count = Column(Integer, nullable=False, default=0) + # reactions: Mapped[list[dict[str, Any]] | None] = Column(JSON, nullable=True) webmentions = Column(JSON, nullable=True) diff --git a/app/templates/notifications.html b/app/templates/notifications.html index 7aa29a8..76b4e5c 100644 --- a/app/templates/notifications.html +++ b/app/templates/notifications.html @@ -7,37 +7,42 @@