fix
This commit is contained in:
parent
c63813aff4
commit
2a57136c33
17
Chat.go
17
Chat.go
@ -174,6 +174,23 @@ func GetMessageContentHandler(c *fiber.Ctx) error {
|
||||
out += " </ct>"
|
||||
out += "</div>"
|
||||
|
||||
// Update the selected value of messages in the database
|
||||
err = edgeClient.Execute(edgeCtx, `
|
||||
WITH m := (SELECT Message FILTER .id = <uuid>$0)
|
||||
UPDATE Message
|
||||
FILTER .area = m.area
|
||||
SET {selected := false};
|
||||
`, messageUUID)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
_ = edgeClient.Execute(edgeCtx, `
|
||||
UPDATE Message
|
||||
FILTER .id = <uuid>$0
|
||||
SET {selected := true};
|
||||
`, messageUUID)
|
||||
|
||||
return c.SendString(out)
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 129 KiB |
Binary file not shown.
Before Width: | Height: | Size: 170 KiB |
@ -47,7 +47,7 @@
|
||||
{% for message in Messages %}
|
||||
<button class="button is-small is-primary message-button is-outlined mr-1"
|
||||
hx-get="/messageContent?id={{ message.Id }}" hx-target="#content-{{ ConversationAreaId }}"
|
||||
onclick="updateIcon('{{ message.Icon }}', '{{ ConversationAreaId }}')">
|
||||
onclick="updateIcon('{{ message.Icon }}', '{{ ConversationAreaId }}')" title="{{ message.Name }}">
|
||||
<span class="icon is-small">
|
||||
<img src="icons/{{ message.Icon }}.png" alt="{{ message.Name }}"
|
||||
style="max-height: 100%; max-width: 100%;">
|
||||
|
Loading…
x
Reference in New Issue
Block a user