diff --git a/src/app/chat/[id]/page.tsx b/src/app/chat/[id]/page.tsx index 58a8bc3..351f38f 100644 --- a/src/app/chat/[id]/page.tsx +++ b/src/app/chat/[id]/page.tsx @@ -68,7 +68,9 @@ export default function DMs() { break; } }} - indicators={indicators} + indicators={indicators.filter( + (indicator) => indicator.indicator.params.user_id !== app.profile?.id + )} /> ) : ( diff --git a/src/components/channel/ChannelView.tsx b/src/components/channel/ChannelView.tsx index bd78cfa..8871f8f 100644 --- a/src/components/channel/ChannelView.tsx +++ b/src/components/channel/ChannelView.tsx @@ -33,7 +33,10 @@ export default function ChannelView({ while (serverRef.current?.CONNECTING) {} serverRef.current?.send(JSON.stringify(req)); }} - indicators={indicators} + indicators={indicators.filter( + (indicator) => + indicator.indicator.params.user_id !== app.profile?.id + )} /> ); diff --git a/src/lib/auth.ts b/src/lib/auth.ts index db007dd..a887b92 100644 --- a/src/lib/auth.ts +++ b/src/lib/auth.ts @@ -69,15 +69,8 @@ export default async function auth({ switch (msg.type) { case "authenticated": - // ws.send( - // JSON.stringify({ - // type: "load_chunk", - // params: { - // channel_id: "general", - // chunk_id: 0, - // }, - // }) - // ); + if (!onIndicator) break; + msg.params.indicators.forEach(onIndicator); break; case "message_create":