Skip to content

Commit

Permalink
Log conversation settings when saving history sync payloads
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Aug 2, 2023
1 parent d19ae64 commit e1189ba
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions historysync.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"fmt"
"time"

"github.com/rs/zerolog"
"maunium.net/go/mautrix/util/variationselector"

waProto "go.mau.fi/whatsmeow/binary/proto"
Expand Down Expand Up @@ -529,6 +530,14 @@ func (user *User) storeHistorySync(evt *waProto.HistorySync) {
Int("lowest_time_index", minTimeIndex).
Time("highest_time", maxTime).
Int("highest_time_index", maxTimeIndex).
Dict("metadata", zerolog.Dict().
Uint32("ephemeral_expiration", conv.GetEphemeralExpiration()).
Bool("marked_unread", conv.GetMarkedAsUnread()).
Bool("archived", conv.GetArchived()).
Uint32("pinned", conv.GetPinned()).
Uint64("mute_end", conv.GetMuteEndTime()).
Uint32("unread_count", conv.GetUnreadCount()),
).
Msg("Saved messages from history sync conversation")
}
log.Info().
Expand Down

0 comments on commit e1189ba

Please sign in to comment.