mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Introduce infrastructure for Notification Profiles
This commit is contained in:
+56
-12
@@ -54,6 +54,7 @@ message ManifestRecord {
|
||||
STICKER_PACK = 6;
|
||||
CALL_LINK = 7;
|
||||
CHAT_FOLDER = 8;
|
||||
NOTIFICATION_PROFILE = 9;
|
||||
}
|
||||
|
||||
bytes raw = 1;
|
||||
@@ -77,6 +78,7 @@ message StorageRecord {
|
||||
StickerPackRecord stickerPack = 6;
|
||||
CallLinkRecord callLink = 7;
|
||||
ChatFolderRecord chatFolder = 8;
|
||||
NotificationProfile notificationProfile = 9;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,6 +230,20 @@ message AccountRecord {
|
||||
optional uint64 endedAtTimestamp = 2;
|
||||
}
|
||||
|
||||
message NotificationProfileManualOverride {
|
||||
message ManuallyEnabled {
|
||||
bytes id = 1;
|
||||
|
||||
// This will be unset if no timespan was chosen in the UI.
|
||||
uint64 endAtTimestampMs = 3;
|
||||
}
|
||||
|
||||
oneof override {
|
||||
uint64 disabledAtTimestampMs = 1;
|
||||
ManuallyEnabled enabled = 2;
|
||||
}
|
||||
}
|
||||
|
||||
bytes profileKey = 1;
|
||||
string givenName = 2;
|
||||
string familyName = 3;
|
||||
@@ -275,6 +291,7 @@ message AccountRecord {
|
||||
optional uint64 backupTier = 40;
|
||||
IAPSubscriberData backupSubscriberData = 41;
|
||||
optional AvatarColor avatarColor = 42;
|
||||
NotificationProfileManualOverride notificationProfileManualOverride = 44;
|
||||
}
|
||||
|
||||
message StoryDistributionListRecord {
|
||||
@@ -314,20 +331,20 @@ message CallLinkRecord {
|
||||
// should be cleared
|
||||
}
|
||||
|
||||
message ChatFolderRecord {
|
||||
message Recipient {
|
||||
message Contact {
|
||||
string serviceId = 1;
|
||||
string e164 = 2;
|
||||
}
|
||||
|
||||
oneof identifier {
|
||||
Contact contact = 1;
|
||||
bytes legacyGroupId = 2;
|
||||
bytes groupMasterKey = 3;
|
||||
}
|
||||
message Recipient {
|
||||
message Contact {
|
||||
string serviceId = 1;
|
||||
string e164 = 2;
|
||||
}
|
||||
|
||||
oneof identifier {
|
||||
Contact contact = 1;
|
||||
bytes legacyGroupId = 2;
|
||||
bytes groupMasterKey = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message ChatFolderRecord {
|
||||
// Represents the default "All chats" folder record vs all other custom folders
|
||||
enum FolderType {
|
||||
UNKNOWN = 0;
|
||||
@@ -347,3 +364,30 @@ message ChatFolderRecord {
|
||||
repeated Recipient excludedRecipients = 10;
|
||||
uint64 deletedAtTimestampMs = 11; // When non-zero, `position` should be set to -1 and `includedRecipients` should be empty
|
||||
}
|
||||
|
||||
message NotificationProfile {
|
||||
enum DayOfWeek {
|
||||
UNKNOWN = 0; // Interpret as "Monday"
|
||||
MONDAY = 1;
|
||||
TUESDAY = 2;
|
||||
WEDNESDAY = 3;
|
||||
THURSDAY = 4;
|
||||
FRIDAY = 5;
|
||||
SATURDAY = 6;
|
||||
SUNDAY = 7;
|
||||
}
|
||||
|
||||
bytes id = 1;
|
||||
string name = 2;
|
||||
optional string emoji = 3;
|
||||
fixed32 color = 4; // 0xAARRGGBB
|
||||
uint64 createdAtMs = 5;
|
||||
bool allowAllCalls = 6;
|
||||
bool allowAllMentions = 7;
|
||||
repeated Recipient allowedMembers = 8;
|
||||
bool scheduleEnabled = 9;
|
||||
uint32 scheduleStartTime = 10; // 24-hour clock int, 0000-2359 (e.g., 15, 900, 1130, 2345)
|
||||
uint32 scheduleEndTime = 11; // 24-hour clock int, 0000-2359 (e.g., 15, 900, 1130, 2345)
|
||||
repeated DayOfWeek scheduleDaysEnabled = 12;
|
||||
uint64 deletedAtTimestampMs = 13;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user