feat(reactions): send emoji reactions via quik-encoded SMS/MMS

Long-press a message to open an emoji reaction picker. Reactions are
sent as a plain SMS/MMS body using a quik-specific zero-width encoding
that carries the original sender's address and the message's timestamp,
so a receiving quik instance can attach the reaction to the exact
message via address + date lookup (fast path), falling back to the
existing text matching for non-quik senders.

The quik pattern is registered first so it wins over the generic Google
Messages pattern; iOS/Google parsing is unchanged. New ParsedEmojiReaction
fields are in-memory only, so no Realm migration is needed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
octoshrimpy
2026-06-14 10:53:05 -04:00
parent a88d5c62e0
commit d0d3501a83
9 changed files with 193 additions and 8 deletions
@@ -21,12 +21,26 @@ package dev.octoshrimpy.quik.repository
import dev.octoshrimpy.quik.model.Message
import io.realm.Realm
data class ParsedEmojiReaction(val emoji: String, val originalMessage: String, val isRemoval: Boolean = false)
data class ParsedEmojiReaction(
val emoji: String,
val originalMessage: String,
val isRemoval: Boolean = false,
val quikSenderAddress: String? = null,
val quikTimestamp: Long? = null,
)
interface EmojiReactionRepository {
fun parseEmojiReaction(body: String): ParsedEmojiReaction?
fun findTargetMessage(threadId: Long, originalMessageText: String, realm: Realm): Message?
fun buildReactionBody(emoji: String, targetMessage: Message): String
fun findTargetMessage(
threadId: Long,
originalMessageText: String,
realm: Realm,
quikSenderAddress: String? = null,
quikTimestamp: Long? = null,
): Message?
fun saveEmojiReaction(
reactionMessage: Message,