diff options
author | Mario <mario@mariovavti.com> | 2021-09-23 12:45:55 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-09-23 12:45:55 +0000 |
commit | e0600b241a8a1bd5f1296bb0dcd5ae12b6cff701 (patch) | |
tree | 182e483954971a227722a9cb0e7f5bb34375cff4 /include | |
parent | d19aa8fb3b8df7ae9598d511093dc1a8d78bbbe9 (diff) | |
download | volse-hubzilla-e0600b241a8a1bd5f1296bb0dcd5ae12b6cff701.tar.gz volse-hubzilla-e0600b241a8a1bd5f1296bb0dcd5ae12b6cff701.tar.bz2 volse-hubzilla-e0600b241a8a1bd5f1296bb0dcd5ae12b6cff701.zip |
make sure we do not mix up likes on direct messages and commments on direct messages in notices
Diffstat (limited to 'include')
-rw-r--r-- | include/items.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php index f451358f8..5e162738c 100644 --- a/include/items.php +++ b/include/items.php @@ -2423,9 +2423,14 @@ function send_status_notifications($post_id,$item) { $unfollowed = false; $parent = 0; + $is_reaction = false; + + $type = ((intval($item['item_private']) === 2) ? NOTIFY_MAIL : NOTIFY_COMMENT); if(array_key_exists('verb',$item) && (activity_match($item['verb'], ACTIVITY_LIKE) || activity_match($item['verb'], ACTIVITY_DISLIKE))) { + $type = NOTIFY_LIKE; + $r = q("select id from item where mid = '%s' and uid = %d limit 1", dbesc($item['thr_parent']), intval($item['uid']) @@ -2494,7 +2499,7 @@ function send_status_notifications($post_id,$item) { Enotify::submit(array( - 'type' => ((intval($item['item_private']) === 2) ? NOTIFY_MAIL : NOTIFY_COMMENT), + 'type' => $type, 'from_xchan' => $item['author_xchan'], 'to_xchan' => $r[0]['channel_hash'], 'item' => $item, |