+ {#if notice.event}
+ {#each uniq(Object.entries(get(notice.status)).filter( ([k, v]) => selected.includes(k), )) as [url, status] (url)}
{@const {message, color} = messageAndColorFromStatus(get(notice.status)[url])}
-
- to
{url}:
-
- {message}
-
+
router.at("notes").of(notice.event.id).open()}>
+ {formatTimestamp(notice.event.created_at)}
+ to {url}:
+ [Kind {notice.event.kind}]
+ {message}
{/each}
-
-
- {:else}
-
-
-
{formatTimestamp(notice.received_at)}
-
[Notice]
-
-
{notice.notice}
+ {:else}
+
+ {formatTimestamp(notice.created_at)}
+ from {notice.url}
+ [{notice.notice[0]}]
+ {#each notice.notice.slice(1).filter(n => typeof n == "string") as item}
+ {item}
+ {/each}
-
-
- {/if}
- {/each}
+ {/if}
+
+ {/each}
+
{/if}
diff --git a/src/engine/state.ts b/src/engine/state.ts
index bd5a82a0..af13fff3 100644
--- a/src/engine/state.ts
+++ b/src/engine/state.ts
@@ -51,8 +51,16 @@ import {
uniq,
uniqBy,
} from "@welshman/lib"
-import type {PublishRequest, Target} from "@welshman/net"
-import {Executor, AuthMode, Local, Multi, Relays, SubscriptionEvent} from "@welshman/net"
+import type {Connection, PublishRequest, Target} from "@welshman/net"
+import {
+ Executor,
+ AuthMode,
+ Local,
+ Multi,
+ Relays,
+ SubscriptionEvent,
+ ConnectionEvent,
+} from "@welshman/net"
import {Nip01Signer, Nip59} from "@welshman/signer"
import {deriveEvents, deriveEventsMapped, throttled, withGetter} from "@welshman/store"
import type {EventTemplate, PublishedList, SignedEvent, TrustedEvent} from "@welshman/util"
@@ -1023,6 +1031,10 @@ const migrateEvents = (events: TrustedEvent[]) => {
)
}
+export type SubscriptionNotice = {created_at: number; notice: string[]}
+
+export const subscriptionNotices = writable