From 242ef4e0cc0687b090b3bdfd1ae7aacc8082a3fd Mon Sep 17 00:00:00 2001 From: Terry Yiu <963907+tyiu@users.noreply.github.com> Date: Sat, 29 Apr 2023 15:20:04 -0400 Subject: [PATCH] Fix bug with reaction notifications referencing the wrong event Changelog-Fixed: Fix bug with reaction notifications referencing the wrong event --- damus/Models/HomeModel.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/damus/Models/HomeModel.swift b/damus/Models/HomeModel.swift index 255f233a..a7ef02d6 100644 --- a/damus/Models/HomeModel.swift +++ b/damus/Models/HomeModel.swift @@ -1107,7 +1107,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)