damus

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

OnlyZapsNotify.swift (454B)


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