This patch depends on: Receiving New Mute List Type
- Changes NewMutesNotify, NewUnmutesNotify & MuteNotify to use MuteItem instead of Pubkey
- Changes is_muted in Contacts.swift to take in a MuteItem instead of a Pubkey
- A lot of changes here were just modifying callers of that to accept the new parameter type
Related: https://github.com/damus-io/damus/issues/1718
Related: https://github.com/damus-io/damus/issues/856
Lighting Address: fishcharlie@strike.me
Signed-off-by: Charlie Fish <contact@charlie.fish>
Reviewed-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>
26 lines
477 B
Swift
26 lines
477 B
Swift
//
|
|
// NewMutesNotify.swift
|
|
// damus
|
|
//
|
|
// Created by William Casarin on 2023-07-30.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
struct NewMutesNotify: Notify {
|
|
typealias Payload = Set<MuteItem>
|
|
var payload: Payload
|
|
}
|
|
|
|
extension NotifyHandler {
|
|
static var new_mutes: NotifyHandler<NewMutesNotify> {
|
|
.init()
|
|
}
|
|
}
|
|
|
|
extension Notifications {
|
|
static func new_mutes(_ pubkeys: Set<MuteItem>) -> Notifications<NewMutesNotify> {
|
|
.init(.init(payload: pubkeys))
|
|
}
|
|
}
|