mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-03-26 17:52:29 +01:00
Makes NIP-22 posts only visible to the main feed if inside the scope they were placed.
This commit is contained in:
parent
9e34e9d720
commit
fb058f93b6
@ -24,6 +24,7 @@ import com.vitorpamplona.amethyst.model.AROUND_ME
|
||||
import com.vitorpamplona.amethyst.model.Account
|
||||
import com.vitorpamplona.amethyst.model.GLOBAL_FOLLOWS
|
||||
import com.vitorpamplona.quartz.encoders.ATag
|
||||
import com.vitorpamplona.quartz.events.CommentEvent
|
||||
import com.vitorpamplona.quartz.events.Event
|
||||
import com.vitorpamplona.quartz.events.EventInterface
|
||||
import com.vitorpamplona.quartz.events.LiveActivitiesEvent
|
||||
@ -52,6 +53,11 @@ class FilterByListParams(
|
||||
noteEvent.isTaggedHashes(followLists.hashtags) ||
|
||||
noteEvent.isTaggedGeoHashes(followLists.geotags) ||
|
||||
noteEvent.isTaggedAddressableNotes(followLists.addresses)
|
||||
} else if (noteEvent is CommentEvent) {
|
||||
// ignore follows and checks only the root scope
|
||||
noteEvent.isTaggedHashes(followLists.hashtags) ||
|
||||
noteEvent.isTaggedGeoHashes(followLists.geotags) ||
|
||||
noteEvent.isTaggedAddressableNotes(followLists.addresses)
|
||||
} else {
|
||||
noteEvent.pubKey in followLists.authors ||
|
||||
noteEvent.isTaggedHashes(followLists.hashtags) ||
|
||||
|
@ -85,8 +85,6 @@ class ContactListEvent(
|
||||
|
||||
fun unverifiedFollowGeohashSet() = tags.filter { it.size > 1 && it[0] == "g" }.mapNotNull { it.getOrNull(1) }
|
||||
|
||||
fun unverifiedFollowAddressSet() = tags.filter { it.size > 1 && it[0] == "a" }.mapNotNull { it.getOrNull(1) }
|
||||
|
||||
fun follows() =
|
||||
tags.mapNotNull {
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user