forked from upstream-mirrors/quik
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user