Log conversation data when syncing (ref #6)
This commit is contained in:
parent
107f164180
commit
7618afed7f
2 changed files with 5 additions and 1 deletions
|
@ -724,7 +724,6 @@ func (portal *Portal) SyncParticipants(source *User, metadata *gmproto.Conversat
|
|||
} else {
|
||||
manyParticipants = true
|
||||
}
|
||||
portal.zlog.Trace().Interface("participant", participant).Msg("Syncing participant")
|
||||
puppet := source.GetPuppetByID(participant.ID.ParticipantID, participant.ID.Number)
|
||||
if puppet == nil {
|
||||
portal.zlog.Error().Any("participant_id", participant.ID).Msg("Failed to get puppet for participant")
|
||||
|
|
5
user.go
5
user.go
|
@ -28,6 +28,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/rs/zerolog"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"maunium.net/go/maulogger/v2"
|
||||
"maunium.net/go/maulogger/v2/maulogadapt"
|
||||
"maunium.net/go/mautrix"
|
||||
|
@ -795,9 +796,13 @@ func (user *User) Logout(state status.BridgeState, unpair bool) (logoutOK bool)
|
|||
func (user *User) syncConversation(v *gmproto.Conversation) {
|
||||
updateType := v.GetStatus()
|
||||
portal := user.GetPortalByID(v.GetConversationID())
|
||||
convCopy := proto.Clone(v).(*gmproto.Conversation)
|
||||
convCopy.LatestMessage = nil
|
||||
log := portal.zlog.With().
|
||||
Str("action", "sync conversation").
|
||||
Str("conversation_status", updateType.String()).
|
||||
Str("room_id", portal.MXID.String()).
|
||||
Interface("conversation_data", convCopy).
|
||||
Logger()
|
||||
if portal.MXID != "" {
|
||||
switch updateType {
|
||||
|
|
Loading…
Reference in a new issue