fix: avoid beep sound on text messages when autoplay disabled

This commit is contained in:
talksik
2026-04-09 12:21:13 -07:00
parent e9af91e0c3
commit d024751135
+2 -2
View File
@@ -34,6 +34,8 @@ export function useStreamAutoplay(
if (latestChild.created_by_human_id === userId) return;
if (useAutoplayStore.getState().muted) return;
if (latestChild.type === "text") {
new Audio(beepSound).play().catch(() => {});
return;
@@ -41,8 +43,6 @@ export function useStreamAutoplay(
if (latestChild.type !== "media") return;
if (useAutoplayStore.getState().muted) return;
const particle = latestChild;
const creator = network?.humans?.find((h) => h.id === particle.created_by_human_id);
const senderName = creator?.email_prefix ?? particle.created_by_human_id;