aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/dm
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-27 16:14:25 -0800
committerAdam Soltys <[email protected]>2026-02-27 16:14:25 -0800
commit0a1981a48832e4cf8822a523474f67f9dfb2f27f (patch)
treef49f22ebb58d103c24c6627ae2382e8f3e401393 /src/routes/(app)/dm
parent16da2cb00d16f87d02535bfdae815f83f19f251f (diff)
downloadcoinos-ui-0a1981a48832e4cf8822a523474f67f9dfb2f27f.tar.gz
coinos-ui-0a1981a48832e4cf8822a523474f67f9dfb2f27f.zip
fix svelte-check issues
Diffstat (limited to 'src/routes/(app)/dm')
-rw-r--r--src/routes/(app)/dm/+page.svelte16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/routes/(app)/dm/+page.svelte b/src/routes/(app)/dm/+page.svelte
index 67c647b0..1f1df536 100644
--- a/src/routes/(app)/dm/+page.svelte
+++ b/src/routes/(app)/dm/+page.svelte
@@ -17,9 +17,11 @@
let { data } = $props();
const user = $derived(data.user);
- if (!user) {
- window.location.replace("/login");
- }
+ (() => {
+ if (!data.user) {
+ window.location.replace("/login");
+ }
+ })();
/// chat selection
const usernameFromPubkey = async (pubkey: string): Promise<string | null> => {
@@ -121,7 +123,7 @@
let messageSenders: any[] = $state([]);
let messageRecipients: any[] = $state([]);
let chats: any[] = $state([]);
- getMessageRumours(user).then(updateSendersRecipients);
+ (() => getMessageRumours(data.user).then(updateSendersRecipients))();
let selectedChat: any = $state(null);
let creatingNewChat = $state(false);
@@ -288,16 +290,16 @@
updateEvents();
};
- libnip17.getPreferredRelays(user.pubkey).then((relays) => {
+ (() => libnip17.getPreferredRelays(data.user.pubkey).then((relays) => {
if (!relays || relays.length == 0) {
relayWarningShown = true;
return;
}
relayWarningShown = false;
- });
+ }))();
let muted = $state(new Set<string>());
- mutedAccounts(user).then((m) => (muted = m));
+ (() => mutedAccounts(data.user).then((m) => (muted = m)))();
const toggleMute = async (pubkey: string) => {
if (muted && muted.has(pubkey)) {