(feat): add sounds
Some checks failed
/ release (push) Has been cancelled
/ build-desktop (linux) (push) Has been cancelled
/ build-web (push) Has been cancelled
/ build-mobile (push) Has been cancelled

This commit is contained in:
Alois 2026-07-30 23:51:38 +02:00
commit 184b85190b
Signed by: alois
SSH key fingerprint: SHA256:GBzT2DXvAuGV9XIV5W3WrzVpjU54FThmxHXdbz95J24
19 changed files with 207 additions and 16 deletions

View file

@ -10,6 +10,7 @@ import { useSession } from "@tensamin/storage/session";
import { useNavigate } from "@tanstack/react-router";
import { decryptChatText } from "@tensamin/crypto/chatSecret";
import { log } from "@tensamin/shared/log";
import { playSound } from "@tensamin/shared/sounds";
import { type RawMessage } from "@tensamin/chat/values";
export const context = createContext<contextType | undefined>(undefined);
@ -44,6 +45,7 @@ export default function Provider(props: { children: React.ReactNode }) {
const chatSecret = await getChatSecret(data.SenderId);
if (!data.Message || !chatSecret) return;
playSound("message");
const user = await get(data.SenderId);
void decryptChatText(chatSecret, data.Message.Content)