Make PushData.clientSecret mandatory.

Also do not restore the last session as a fallback, it can lead to error in a multi account context, or even when a ghost pusher send a Push.
This commit is contained in:
Benoit Marty 2025-09-18 10:48:39 +02:00 committed by Benoit Marty
parent 807b066520
commit b9df8f969a
5 changed files with 16 additions and 84 deletions

View file

@ -34,10 +34,11 @@ data class PushDataFirebase(
fun PushDataFirebase.toPushData(): PushData? {
val safeEventId = eventId?.let(::EventId) ?: return null
val safeRoomId = roomId?.let(::RoomId) ?: return null
val safeClientSecret = clientSecret ?: return null
return PushData(
eventId = safeEventId,
roomId = safeRoomId,
unread = unread,
clientSecret = clientSecret,
clientSecret = safeClientSecret,
)
}