From 9f701a7d441d42e5509f19ec45e2fbd3afcc1bad 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 Closes: #1047 --- 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 14f8a81f..651c7f8a 100644 --- 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)