Fix potential NPE during archive export.

This commit is contained in:
Greyson Parrelli
2025-03-21 11:25:35 -04:00
parent 2b1f71d3b6
commit 8b54cea119

View File

@@ -612,7 +612,7 @@ private fun BackupMessageRecord.toRemoteSessionSwitchoverUpdate(): ChatUpdateMes
return ChatUpdateMessage(
sessionSwitchover = try {
val event = SessionSwitchoverEvent.ADAPTER.decode(Base64.decodeOrThrow(this.body))
SessionSwitchoverChatUpdate(event.e164.e164ToLong()!!)
SessionSwitchoverChatUpdate(event.e164.e164ToLong() ?: 0)
} catch (e: IOException) {
SessionSwitchoverChatUpdate()
}