go: send more metadata on messeges
This commit is contained in:
parent
067749823b
commit
71d237046d
1 changed files with 8 additions and 5 deletions
|
|
@ -115,11 +115,14 @@ func (mxc *MXClient) _onEventMember(ctx context.Context, evt *event.Event) {
|
||||||
|
|
||||||
func (mxc *MXClient) _onMessage(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(),
|
out, err := json.Marshal(map[string]any{"sender": evt.Sender.String(),
|
||||||
"type": evt.Type.String(),
|
"type": evt.Type.String(),
|
||||||
"id": evt.ID.String(),
|
"server_timestamp": evt.Timestamp,
|
||||||
"roomid": evt.RoomID.String(),
|
"id": evt.ID.String(),
|
||||||
"is_direct": mxc.IsDirectRoom(evt.RoomID),
|
"roomid": evt.RoomID.String(),
|
||||||
"content": evt.Content.Raw})
|
"is_direct": mxc.IsDirectRoom(evt.RoomID),
|
||||||
|
"content": evt.Content.Raw,
|
||||||
|
"redacts": evt.Redacts,
|
||||||
|
"unsigned": evt.Unsigned})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).
|
log.Error().Err(err).
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue