Handle all parts of message failing to send

This commit is contained in:
Tulir Asokan 2023-08-30 17:16:24 +03:00
parent 1b774b11ac
commit 1d86a6c129

View file

@ -665,7 +665,11 @@ func (portal *Portal) sendMessageParts(ctx context.Context, converted *Converted
}
}
}
portal.markHandled(converted, eventIDs[0], mediaParts, true)
if len(eventIDs) > 0 {
portal.markHandled(converted, eventIDs[0], mediaParts, true)
} else {
zerolog.Ctx(ctx).Warn().Msg("All parts of message failed to send")
}
return eventIDs
}