Log incoming message metadata before processing it
This commit is contained in:
parent
c0fe4a16df
commit
2ec1dcda6c
1 changed files with 8 additions and 0 deletions
8
user.go
8
user.go
|
@ -604,6 +604,14 @@ func (user *User) syncHandleEvent(event any) {
|
|||
case *gmproto.Conversation:
|
||||
go user.syncConversation(v, "event")
|
||||
case *gmproto.Message:
|
||||
user.zlog.Debug().
|
||||
Str("conversation_id", v.GetConversationID()).
|
||||
Str("participant_id", v.GetParticipantID()).
|
||||
Str("message_id", v.GetMessageID()).
|
||||
Str("message_status", v.GetMessageStatus().GetStatus().String()).
|
||||
Int64("message_ts", v.GetTimestamp()).
|
||||
Str("tmp_id", v.GetTmpID()).
|
||||
Msg("Received message")
|
||||
portal := user.GetPortalByID(v.GetConversationID())
|
||||
portal.messages <- PortalMessage{evt: v, source: user}
|
||||
case *gmproto.UserAlertEvent:
|
||||
|
|
Loading…
Reference in a new issue