change mute test to equality with string including event 30000 and user hex
This commit is contained in:
@@ -13,14 +13,12 @@ import com.vitorpamplona.quartz.utils.TimeUtils
|
|||||||
|
|
||||||
class HomeConversationsFeedFilter(val account: Account) : AdditiveFeedFilter<Note>() {
|
class HomeConversationsFeedFilter(val account: Account) : AdditiveFeedFilter<Note>() {
|
||||||
|
|
||||||
private val regex = ("30000:[a-f0-9]+:" + PeopleListEvent.blockList).toRegex(RegexOption.IGNORE_CASE)
|
|
||||||
|
|
||||||
override fun feedKey(): String {
|
override fun feedKey(): String {
|
||||||
return account.userProfile().pubkeyHex + "-" + account.defaultHomeFollowList
|
return account.userProfile().pubkeyHex + "-" + account.defaultHomeFollowList
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun showHiddenKey(): Boolean {
|
override fun showHiddenKey(): Boolean {
|
||||||
return regex.matches(account.defaultHomeFollowList)
|
return account.defaultHomeFollowList == "30000:${account.userProfile().pubkeyHex}:${PeopleListEvent.blockList}"
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun feed(): List<Note> {
|
override fun feed(): List<Note> {
|
||||||
|
|||||||
@@ -18,14 +18,12 @@ import com.vitorpamplona.quartz.utils.TimeUtils
|
|||||||
|
|
||||||
class HomeNewThreadFeedFilter(val account: Account) : AdditiveFeedFilter<Note>() {
|
class HomeNewThreadFeedFilter(val account: Account) : AdditiveFeedFilter<Note>() {
|
||||||
|
|
||||||
private val regex = ("30000:[a-f0-9]+:" + PeopleListEvent.blockList).toRegex(RegexOption.IGNORE_CASE)
|
|
||||||
|
|
||||||
override fun feedKey(): String {
|
override fun feedKey(): String {
|
||||||
return account.userProfile().pubkeyHex + "-" + account.defaultHomeFollowList
|
return account.userProfile().pubkeyHex + "-" + account.defaultHomeFollowList
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun showHiddenKey(): Boolean {
|
override fun showHiddenKey(): Boolean {
|
||||||
return regex.matches(account.defaultHomeFollowList)
|
return account.defaultHomeFollowList == "30000:${account.userProfile().pubkeyHex}:${PeopleListEvent.blockList}"
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun feed(): List<Note> {
|
override fun feed(): List<Note> {
|
||||||
|
|||||||
Reference in New Issue
Block a user