mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 08:09:12 +01:00
Add notification profile id for backupsv2.
This commit is contained in:
@@ -12,7 +12,8 @@ data class NotificationProfile(
|
||||
val allowAllCalls: Boolean = true,
|
||||
val allowAllMentions: Boolean = false,
|
||||
val schedule: NotificationProfileSchedule,
|
||||
val allowedMembers: Set<RecipientId> = emptySet()
|
||||
val allowedMembers: Set<RecipientId> = emptySet(),
|
||||
val notificationProfileId: NotificationProfileId
|
||||
) : Comparable<NotificationProfile> {
|
||||
|
||||
fun isRecipientAllowed(id: RecipientId): Boolean {
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright 2025 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.thoughtcrime.securesms.notifications.profiles
|
||||
|
||||
import org.signal.core.util.DatabaseId
|
||||
import org.whispersystems.signalservice.api.util.UuidUtil
|
||||
import java.util.UUID
|
||||
|
||||
/**
|
||||
* Typed wrapper for notification profile uuid.
|
||||
*/
|
||||
data class NotificationProfileId(val uuid: UUID) : DatabaseId {
|
||||
companion object {
|
||||
fun from(id: String): NotificationProfileId {
|
||||
return NotificationProfileId(UuidUtil.parseOrThrow(id))
|
||||
}
|
||||
|
||||
fun generate(): NotificationProfileId {
|
||||
return NotificationProfileId(UUID.randomUUID())
|
||||
}
|
||||
}
|
||||
|
||||
override fun serialize(): String {
|
||||
return uuid.toString()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user