refactor: add Pubkey, Privkey, NoteId string aliases
This is a non-behavioral change in preparation for the actual switchover from Strings to Ids. The purpose of this kit is to reduce the size of the switchover commit which is going to be very large.
This commit is contained in:
@@ -11,18 +11,18 @@ class FollowingModel {
|
||||
let damus_state: DamusState
|
||||
var needs_sub: Bool = true
|
||||
|
||||
let contacts: [String]
|
||||
|
||||
let contacts: [Pubkey]
|
||||
|
||||
let sub_id: String = UUID().description
|
||||
|
||||
init(damus_state: DamusState, contacts: [String]) {
|
||||
init(damus_state: DamusState, contacts: [Pubkey]) {
|
||||
self.damus_state = damus_state
|
||||
self.contacts = contacts
|
||||
}
|
||||
|
||||
func get_filter() -> NostrFilter {
|
||||
var f = NostrFilter(kinds: [.metadata])
|
||||
f.authors = self.contacts.reduce(into: Array<String>()) { acc, pk in
|
||||
f.authors = self.contacts.reduce(into: Array<Pubkey>()) { acc, pk in
|
||||
// don't fetch profiles we already have
|
||||
if damus_state.profiles.has_fresh_profile(id: pk) {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user