1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-12-02 20:22:52 +00:00

fixes to files

This commit is contained in:
Laura
2025-09-14 22:42:47 +02:00
parent fdb23d815b
commit 09a4d4015b
2 changed files with 15 additions and 3 deletions

View File

@@ -61,6 +61,10 @@ func NewStream(w http.ResponseWriter, ctx context.Context) (*Stream, error) {
}
func NewChunk(typ ChunkType, data any) *Chunk {
if str, ok := data.(string); ok {
data = CleanChunk(str)
}
return &Chunk{
Type: typ,
Data: data,