diff --git a/Chat.go b/Chat.go index 111b316..00ec0a3 100644 --- a/Chat.go +++ b/Chat.go @@ -808,7 +808,24 @@ func DeleteConversationHandler(c *fiber.Ctx) error { panic(err) } - return c.SendString(GenerateConversationPopoverHTML(true)) + // Select the default conversation + err = edgeClient.Execute(edgeCtx, ` + UPDATE Conversation + FILTER .user = global currentUser AND .name = 'Default' + SET { + selected := true + }; + `) + if err != nil { + fmt.Println("Error selecting default conversation") + panic(err) + } + + reloadChatTriggerHTML := ` + + ` + + return c.SendString(GenerateConversationPopoverHTML(true) + reloadChatTriggerHTML) } func SelectConversationHandler(c *fiber.Ctx) error { diff --git a/views/chat.html b/views/chat.html index 42f351b..1e80078 100644 --- a/views/chat.html +++ b/views/chat.html @@ -1,12 +1,14 @@ -
+
{% if IsSubscribed or not IsLimiteReached %}
- +
+ +
@@ -39,6 +41,17 @@