From d25232b128cf0f0709d49def8baa6327ec029137 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Thu, 8 Aug 2024 18:25:22 +1200 Subject: [PATCH] treat EmojiReact activities as Likes --- app/activitypub/routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/activitypub/routes.py b/app/activitypub/routes.py index 2aa43c95..eccc592f 100644 --- a/app/activitypub/routes.py +++ b/app/activitypub/routes.py @@ -739,7 +739,7 @@ def process_inbox_request(request_json, activitypublog_id, ip_address): activity_log.exception_message = 'Activity about local content which is already present' activity_log.result = 'ignored' - elif request_json['object']['type'] == 'Like': + elif request_json['object']['type'] == 'Like' or request_json['object']['type'] == 'EmojiReact': activity_log.activity_type = request_json['object']['type'] user_ap_id = request_json['object']['actor'] liked_ap_id = request_json['object']['object'] @@ -1081,7 +1081,7 @@ def process_inbox_request(request_json, activitypublog_id, ip_address): else: activity_log.exception_message = 'Delete: cannot find ' + ap_id - elif request_json['type'] == 'Like': # Upvote + elif request_json['type'] == 'Like' or request_json['type'] == 'EmojiReact': # Upvote activity_log.activity_type = request_json['type'] user_ap_id = request_json['actor'] user = find_actor_or_create(user_ap_id)