fix base64 encode of jsons

This commit is contained in:
2026-04-11 22:38:05 +02:00
parent d2cd784b6a
commit 62ff403d92
3 changed files with 1 additions and 11 deletions
BIN
View File
Binary file not shown.
-3
View File
@@ -1,6 +1,3 @@
fix irc
chat history
rewrite to use uuid
media support
+1 -8
View File
@@ -2,7 +2,6 @@ package main
import (
"context"
"encoding/json"
"errors"
"log"
"net/http"
@@ -63,15 +62,9 @@ func sendMessageStructCloseIfTimeout(user *User, message *Message) {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
jsonMsg, err := json.Marshal(message)
if err != nil {
log.Printf("json marshal error: %v", err)
return
}
err = wsjson.Write(ctx, user.WsConn, jsonMsg)
err := wsjson.Write(ctx, user.WsConn, message)
if err != nil {
log.Printf("json write error: %v", err)
return
}
}