Handle conversations with no room

This commit is contained in:
Jon Staab
2025-06-27 09:44:01 -07:00
parent fd42a0e8d4
commit f2249fe592
2 changed files with 8 additions and 6 deletions
@@ -20,8 +20,6 @@
const convs = []
for (const [room, messages] of groupBy(e => getTagValue("h", e.tags), $messages).entries()) {
if (!room) continue
const avgTime = avg(overlappingPairs(messages).map(([a, b]) => a.created_at - b.created_at))
const groups: TrustedEvent[][] = []
const group: TrustedEvent[] = []
@@ -79,7 +77,7 @@
{#if $messages.length > 0}
{@const events = $messages.slice(0, 1)}
{@const event = events[0]}
{@const room = getTagValue("h", event.tags)!}
{@const room = getTagValue("h", event.tags)}
<ConversationCard
{url}
{room}