feat: chat stickers

This commit is contained in:
gosangam
2026-08-30 02:19:31 +05:30
parent 8c7afe596d
commit 2597c6f2ec
9 changed files with 332 additions and 18 deletions
+8 -1
View File
@@ -168,6 +168,7 @@ export default function ChatThreadPage() {
replyToId?: string,
previewUrl?: string,
attachments?: UploadedAttachment[],
stickerKey?: string,
) => {
const clientMsgId = crypto.randomUUID();
const optimistic: ChatMessage = {
@@ -188,7 +189,13 @@ export default function ChatThreadPage() {
setMessages((prev) => [...prev, optimistic]);
chat
.send(id, body, { clientMsgId, replyToId, previewUrl, attachments })
.send(id, body, {
clientMsgId,
replyToId,
previewUrl,
attachments,
stickerKey,
})
.then((saved) => {
setMessages((prev) => {
// Drop the placeholder and any realtime echo of the same message.