damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

LikedNotify.swift (447B)


      1 //
      2 //  LikedNotify.swift
      3 //  damus
      4 //
      5 //  Created by William Casarin on 2023-07-30.
      6 //
      7 
      8 import Foundation
      9 
     10 struct LikedNotify: Notify {
     11     typealias Payload = Counted
     12     var payload: Counted
     13 }
     14 
     15 extension NotifyHandler {
     16     static var liked: NotifyHandler<LikedNotify> {
     17         .init()
     18     }
     19 }
     20 
     21 extension Notifications {
     22     static func liked(_ counted: Counted) -> Notifications<LikedNotify> {
     23         .init(.init(payload: counted))
     24     }
     25 }
     26 
     27