fix: filter out chess game challenges from home feed, keep only ended games
LiveChessGameChallengeEvent (kind 30064) represents game offers/challenges that haven't ended yet. Remove them from both the home feed filter and the relay subscription so only completed games (kind 64) and game end events (kind 30067) appear. https://claude.ai/code/session_01XiWkVxXQBnLPTbeswL3y4c
This commit is contained in:
-3
@@ -43,7 +43,6 @@ import com.vitorpamplona.quartz.nip18Reposts.RepostEvent
|
||||
import com.vitorpamplona.quartz.nip22Comments.CommentEvent
|
||||
import com.vitorpamplona.quartz.nip23LongContent.LongTextNoteEvent
|
||||
import com.vitorpamplona.quartz.nip54Wiki.WikiNoteEvent
|
||||
import com.vitorpamplona.quartz.nip64Chess.challenge.offer.LiveChessGameChallengeEvent
|
||||
import com.vitorpamplona.quartz.nip64Chess.end.LiveChessGameEndEvent
|
||||
import com.vitorpamplona.quartz.nip64Chess.game.ChessGameEvent
|
||||
import com.vitorpamplona.quartz.nip84Highlights.HighlightEvent
|
||||
@@ -62,7 +61,6 @@ class HomeNewThreadFeedFilter(
|
||||
WikiNoteEvent.KIND,
|
||||
ClassifiedsEvent.KIND,
|
||||
LongTextNoteEvent.KIND,
|
||||
LiveChessGameChallengeEvent.KIND,
|
||||
LiveChessGameEndEvent.KIND,
|
||||
AttestationEvent.KIND,
|
||||
)
|
||||
@@ -130,7 +128,6 @@ class HomeNewThreadFeedFilter(
|
||||
noteEvent is VoiceEvent ||
|
||||
noteEvent is AudioHeaderEvent ||
|
||||
noteEvent is ChessGameEvent ||
|
||||
noteEvent is LiveChessGameChallengeEvent ||
|
||||
noteEvent is LiveChessGameEndEvent ||
|
||||
noteEvent is AttestationEvent ||
|
||||
noteEvent is AttestationRequestEvent ||
|
||||
|
||||
-2
@@ -24,14 +24,12 @@ import com.vitorpamplona.amethyst.model.topNavFeeds.chess.ChessTopNavPerRelayFil
|
||||
import com.vitorpamplona.amethyst.service.relays.SincePerRelayMap
|
||||
import com.vitorpamplona.quartz.nip01Core.relay.client.pool.RelayBasedFilter
|
||||
import com.vitorpamplona.quartz.nip01Core.relay.filters.Filter
|
||||
import com.vitorpamplona.quartz.nip64Chess.challenge.offer.LiveChessGameChallengeEvent
|
||||
import com.vitorpamplona.quartz.nip64Chess.end.LiveChessGameEndEvent
|
||||
import com.vitorpamplona.quartz.nip64Chess.game.ChessGameEvent
|
||||
|
||||
val ChessPostsKinds =
|
||||
listOf(
|
||||
ChessGameEvent.KIND, // Completed games (Kind 64)
|
||||
LiveChessGameChallengeEvent.KIND, // Challenges (Kind 30064)
|
||||
LiveChessGameEndEvent.KIND, // Game endings (Kind 30067)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user