Log if convertGoogleMessage returns nil in update handler
This commit is contained in:
parent
d19b3b5a6f
commit
1898a95621
1 changed files with 4 additions and 0 deletions
|
@ -572,6 +572,10 @@ func (portal *Portal) handleExistingMessageUpdate(ctx context.Context, source *U
|
||||||
hasPendingMedia && updatedMediaIsComplete,
|
hasPendingMedia && updatedMediaIsComplete,
|
||||||
dbMsg.Status.PartCount != len(evt.MessageInfo):
|
dbMsg.Status.PartCount != len(evt.MessageInfo):
|
||||||
converted := portal.convertGoogleMessage(ctx, source, evt, false, raw)
|
converted := portal.convertGoogleMessage(ctx, source, evt, false, raw)
|
||||||
|
if converted == nil {
|
||||||
|
log.Warn().Msg("Didn't get converted parts for updated event")
|
||||||
|
return
|
||||||
|
}
|
||||||
dbMsg.Status.MediaStatus = converted.MediaStatus
|
dbMsg.Status.MediaStatus = converted.MediaStatus
|
||||||
if dbMsg.Status.MediaParts == nil {
|
if dbMsg.Status.MediaParts == nil {
|
||||||
dbMsg.Status.MediaParts = make(map[string]database.MediaPart)
|
dbMsg.Status.MediaParts = make(map[string]database.MediaPart)
|
||||||
|
|
Loading…
Reference in a new issue