UnfollowNotify.swift (567B)
1 // 2 // UnfollowNotify.swift 3 // damus 4 // 5 // Created by William Casarin on 2023-07-30. 6 // 7 8 import Foundation 9 10 /// Notification sent when an unfollow action is initiatied. Not to be confused with unfollowed 11 struct UnfollowNotify: Notify { 12 typealias Payload = FollowTarget 13 var payload: Payload 14 } 15 16 extension NotifyHandler { 17 static var unfollow: NotifyHandler<UnfollowNotify> { 18 .init() 19 } 20 } 21 22 extension Notifications { 23 static func unfollow(_ target: FollowTarget) -> Notifications<UnfollowNotify> { 24 .init(.init(payload: target)) 25 } 26 }