(feat): add MessageDeleteLive
All checks were successful
/ build-web (push) Successful in 6m34s
/ build-desktop (linux) (push) Successful in 12m5s
/ build-mobile (push) Successful in 19m39s
/ release (push) Successful in 3m2s

This commit is contained in:
Alois 2026-07-11 23:12:42 +02:00
commit 3ce708b86a
6 changed files with 86 additions and 45 deletions

View file

@ -242,6 +242,14 @@ export default function CacheSync() {
);
return;
}
if (message.type === "MessageDeleteLive") {
const deleteData = message.data as {
ChatPartnerId: number;
SendTime: number;
};
await removeMessage(deleteData.ChatPartnerId, deleteData.SendTime);
return;
}
if (message.type === "MessageState") {
await replaceMessage(
Number(data.ChatPartnerId),
@ -257,7 +265,7 @@ export default function CacheSync() {
);
}
},
[accountId, insertMessage, replaceMessage],
[accountId, insertMessage, removeMessage, replaceMessage],
);
useEffect(() => {