mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 16:19:33 +01:00
Add notification profiles to storage service.
This commit is contained in:
committed by
Cody Henthorne
parent
07d961fc09
commit
e3ee3d3dba
@@ -2,20 +2,28 @@ package org.thoughtcrime.securesms.notifications.profiles
|
||||
|
||||
import org.thoughtcrime.securesms.conversation.colors.AvatarColor
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId
|
||||
import org.whispersystems.signalservice.api.storage.StorageId
|
||||
|
||||
data class NotificationProfile(
|
||||
val id: Long,
|
||||
val name: String,
|
||||
val emoji: String,
|
||||
val color: AvatarColor = AvatarColor.A210,
|
||||
val color: AvatarColor = DEFAULT_NOTIFICATION_PROFILE_COLOR,
|
||||
val createdAt: Long,
|
||||
val allowAllCalls: Boolean = true,
|
||||
val allowAllMentions: Boolean = false,
|
||||
val schedule: NotificationProfileSchedule,
|
||||
val allowedMembers: Set<RecipientId> = emptySet(),
|
||||
val notificationProfileId: NotificationProfileId
|
||||
val notificationProfileId: NotificationProfileId,
|
||||
val deletedTimestampMs: Long = 0,
|
||||
val storageServiceId: StorageId? = null,
|
||||
val storageServiceProto: ByteArray? = null
|
||||
) : Comparable<NotificationProfile> {
|
||||
|
||||
companion object {
|
||||
val DEFAULT_NOTIFICATION_PROFILE_COLOR = AvatarColor.A210
|
||||
}
|
||||
|
||||
fun isRecipientAllowed(id: RecipientId): Boolean {
|
||||
return allowedMembers.contains(id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user