commit 9f701a7d441d42e5509f19ec45e2fbd3afcc1bad
parent cb11087034ab7352cbf5d8ff56f8edce4d90795e
Author: Terry Yiu <963907+tyiu@users.noreply.github.com>
Date: Sat, 29 Apr 2023 15:20:04 -0400
Fix bug with reaction notifications referencing the wrong event
Changelog-Fixed: Fix bug with reaction notifications referencing the wrong event
Closes: #1047
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/damus/Models/HomeModel.swift b/damus/Models/HomeModel.swift
@@ -1126,7 +1126,7 @@ func process_local_notification(damus_state: DamusState, event ev: NostrEvent) {
let notify = LocalNotification(type: .repost, event: ev, target: inner_ev, content: inner_ev.content)
create_local_notification(profiles: damus_state.profiles, notify: notify)
} else if type == .like && damus_state.settings.like_notification,
- let evid = ev.referenced_ids.first?.ref_id,
+ let evid = ev.referenced_ids.last?.ref_id,
let liked_event = damus_state.events.lookup(evid)
{
let notify = LocalNotification(type: .like, event: ev, target: liked_event, content: liked_event.content)