Fixes the lack of relay icons in the NIP44 messages
This commit is contained in:
@@ -238,14 +238,16 @@ object NostrAccountDataSource : NostrDataSource("AccountData") {
|
||||
if (LocalCache.justVerify(event)) {
|
||||
if (event is GiftWrapEvent) {
|
||||
// Avoid decrypting over and over again if the event already exist.
|
||||
if (LocalCache.getNoteIfExists(event.id) != null) return
|
||||
val note = LocalCache.getNoteIfExists(event.id)
|
||||
if (note != null && relay.brief in note.relays) return
|
||||
|
||||
event.cachedGift(account.signer) { this.consume(it, relay) }
|
||||
}
|
||||
|
||||
if (event is SealedGossipEvent) {
|
||||
// Avoid decrypting over and over again if the event already exist.
|
||||
if (LocalCache.getNoteIfExists(event.id) != null) return
|
||||
val note = LocalCache.getNoteIfExists(event.id)
|
||||
if (note != null && relay.brief in note.relays) return
|
||||
|
||||
event.cachedGossip(account.signer) { LocalCache.justConsume(it, relay) }
|
||||
} else {
|
||||
|
||||
@@ -43,9 +43,7 @@ class ChatroomFeedFilter(val withUser: ChatroomKey, val account: Account) :
|
||||
override fun applyFilter(collection: Set<Note>): Set<Note> {
|
||||
val messages = account.userProfile().privateChatrooms[withUser] ?: return emptySet()
|
||||
|
||||
return collection
|
||||
.filter { it in messages.roomMessages && account.isAcceptable(it) == true }
|
||||
.toSet()
|
||||
return collection.filter { it in messages.roomMessages && account.isAcceptable(it) }.toSet()
|
||||
}
|
||||
|
||||
override fun sort(collection: Set<Note>): List<Note> {
|
||||
|
||||
Reference in New Issue
Block a user