From 0744156c0cfc1b94b2ac22b1493d77dd690e0a7e Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sat, 2 Jul 2022 12:13:06 -0700 Subject: [PATCH] Fix unfollow crash Changelog-Fixed: Fixed crash when unfollowing users Signed-off-by: William Casarin --- damus/ContentView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/damus/ContentView.swift b/damus/ContentView.swift index e58cffd2..d9bcb8de 100644 --- a/damus/ContentView.swift +++ b/damus/ContentView.swift @@ -238,11 +238,13 @@ struct ContentView: View { return } - let pk = notif.object as! String guard let damus = self.damus_state else { return } + let target = notif.object as! FollowTarget + let pk = target.pubkey + if unfollow_user(pool: damus.pool, our_contacts: damus.contacts.event, pubkey: damus.pubkey,