MentionsFeeder

class MentionsFeeder(localDatabase: UserDatabaseBuilder, dispatcher: <Error class: unknown class> = KaliumDispatcherImpl)

Debug-only feeder that injects synthetic @mentions into text messages for a given conversation.

It does two things:

  1. Rewrites some text messages so their body contains @DisplayName tokens.

  2. Inserts matching rows into MessageMention with correct start, length, user_id.

Heuristics:

  • works only on TEXT messages with VISIBLE visibility

  • picks roughly every 5th text message in the conversation

  • attaches up to 3 mentions per message

  • uses display names of users who actually sent messages in this conversation

⚠️ Irreversible:

  • message text bodies are overwritten for selected messages

  • there is no automatic way back to the original content

  • must never be used in production

Constructors

Link copied to clipboard
constructor(localDatabase: UserDatabaseBuilder, dispatcher: <Error class: unknown class> = KaliumDispatcherImpl)

Functions

Link copied to clipboard
suspend fun feed(conversationId: ConversationIDEntity): <Error class: unknown class>

Feeds mentions into the given conversation: