mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
treat EmojiReact activities as Likes
This commit is contained in:
parent
5b8d4642ca
commit
d25232b128
1 changed files with 2 additions and 2 deletions
|
@ -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.exception_message = 'Activity about local content which is already present'
|
||||||
activity_log.result = 'ignored'
|
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']
|
activity_log.activity_type = request_json['object']['type']
|
||||||
user_ap_id = request_json['object']['actor']
|
user_ap_id = request_json['object']['actor']
|
||||||
liked_ap_id = request_json['object']['object']
|
liked_ap_id = request_json['object']['object']
|
||||||
|
@ -1081,7 +1081,7 @@ def process_inbox_request(request_json, activitypublog_id, ip_address):
|
||||||
else:
|
else:
|
||||||
activity_log.exception_message = 'Delete: cannot find ' + ap_id
|
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']
|
activity_log.activity_type = request_json['type']
|
||||||
user_ap_id = request_json['actor']
|
user_ap_id = request_json['actor']
|
||||||
user = find_actor_or_create(user_ap_id)
|
user = find_actor_or_create(user_ap_id)
|
||||||
|
|
Loading…
Add table
Reference in a new issue