go: send more metadata on messeges

This commit is contained in:
saces 2026-04-13 21:41:22 +02:00
parent 067749823b
commit 71d237046d

View file

@ -116,10 +116,13 @@ func (mxc *MXClient) _onEventMember(ctx context.Context, evt *event.Event) {
func (mxc *MXClient) _onMessage(ctx context.Context, evt *event.Event) {
out, err := json.Marshal(map[string]any{"sender": evt.Sender.String(),
"type": evt.Type.String(),
"server_timestamp": evt.Timestamp,
"id": evt.ID.String(),
"roomid": evt.RoomID.String(),
"is_direct": mxc.IsDirectRoom(evt.RoomID),
"content": evt.Content.Raw})
"content": evt.Content.Raw,
"redacts": evt.Redacts,
"unsigned": evt.Unsigned})
if err != nil {
log.Error().Err(err).