Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 58 additions & 1 deletion chat-apis.json
Original file line number Diff line number Diff line change
Expand Up @@ -8739,6 +8739,8 @@
"messagesOverride": true,
"repliesSetting": 2,
"repliesOverride": true,
"quotedRepliesSetting": 2,
"quotedRepliesOverride": true,
"messageDeletedSetting": 2,
"reactionsSetting": 2,
"reactionsOverride": true,
Expand Down Expand Up @@ -8779,6 +8781,8 @@
"messagesOverride": true,
"repliesSetting": 2,
"repliesOverride": true,
"quotedRepliesSetting": 2,
"quotedRepliesOverride": true,
"messageEditedSetting": 2,
"messageDeletedSetting": 2,
"reactionsSetting": 2,
Expand Down Expand Up @@ -9538,6 +9542,8 @@
"messagesOverride": true,
"repliesSetting": 2,
"repliesOverride": true,
"quotedRepliesSetting": 2,
"quotedRepliesOverride": true,
"reactionsSetting": 2,
"reactionsOverride": true,
"memberLeftSetting": 1,
Expand All @@ -9560,6 +9566,8 @@
"messagesOverride": true,
"repliesSetting": 2,
"repliesOverride": true,
"quotedRepliesSetting": 2,
"quotedRepliesOverride": true,
"reactionsSetting": 2,
"reactionsOverride": true
},
Expand Down Expand Up @@ -9735,6 +9743,8 @@
"messagesOverride": true,
"repliesSetting": 2,
"repliesOverride": true,
"quotedRepliesSetting": 2,
"quotedRepliesOverride": true,
"reactionsSetting": 2,
"reactionsOverride": true,
"memberLeftSetting": 1,
Expand All @@ -9757,6 +9767,8 @@
"messagesOverride": true,
"repliesSetting": 2,
"repliesOverride": true,
"quotedRepliesSetting": 2,
"quotedRepliesOverride": true,
"reactionsSetting": 2,
"reactionsOverride": true
},
Expand Down Expand Up @@ -9920,6 +9932,7 @@
"groupPreferences": {
"groupMessages": 2,
"groupReplies": 2,
"groupQuotedReplies": 2,
"groupReactions": 2,
"groupMemberLeft": 1,
"groupMemberAdded": 1,
Expand All @@ -9932,6 +9945,7 @@
"oneOnOnePreferences": {
"oneOnOneMessages": 2,
"oneOnOneReplies": 2,
"oneOnOneQuotedReplies": 2,
"oneOnOneReactions": 2
},
"mutePreferences": {
Expand Down Expand Up @@ -11962,13 +11976,14 @@
{
"name": "reason",
"in": "query",
"description": "Available only when the value of notificationTriggered is false.\nThis contains the reason for not triggering the notification provider.\n\nTo filter logs using reason, use the following values: MESSAGES_PREFERENCE, REPLIES_PREFERENCE, MESSAGE_ACTIONS_PREFERENCE, REACTIONS_PREFERENCE, GROUP_ACTIONS_PREFERENCE, DND_PREFERENCE, MUTE_PREFERENCE, SCHEDULE_PREFERENCE, CALL_PREFERENCE, QUOTA_PREFERENCE, MISSING_EMAIL, MISSING_PHNO, INVALID_PUSH_PROVIDER_ID, TIMED_OUT, NOT_FOUND, TWILIO_CREATE_ERROR.",
"description": "Available only when the value of notificationTriggered is false.\nThis contains the reason for not triggering the notification provider.\n\nTo filter logs using reason, use the following values: MESSAGES_PREFERENCE, REPLIES_PREFERENCE, QUOTED_REPLIES_PREFERENCE, MESSAGE_ACTIONS_PREFERENCE, REACTIONS_PREFERENCE, GROUP_ACTIONS_PREFERENCE, DND_PREFERENCE, MUTE_PREFERENCE, SCHEDULE_PREFERENCE, CALL_PREFERENCE, QUOTA_PREFERENCE, MISSING_EMAIL, MISSING_PHNO, INVALID_PUSH_PROVIDER_ID, TIMED_OUT, NOT_FOUND, TWILIO_CREATE_ERROR.",
"required": false,
"schema": {
"type": "string",
"enum": [
"MESSAGES_PREFERENCE",
"REPLIES_PREFERENCE",
"QUOTED_REPLIES_PREFERENCE",
"MESSAGE_ACTIONS_PREFERENCE",
"REACTIONS_PREFERENCE",
"GROUP_ACTIONS_PREFERENCE",
Expand Down Expand Up @@ -15137,6 +15152,18 @@
"repliesOverride": {
"type": "boolean"
},
"quotedRepliesSetting": {
"description": "1: Don't notify\n2: Notify for all replies\n3: Notify for replies with mentions",
"type": "integer",
"enum": [
1,
2,
3
]
},
"quotedRepliesOverride": {
"type": "boolean"
},
"reactionsSetting": {
"description": "1: Don't notify\n2: Notify for reactions received on own messages\n3: Notify for reactions received on all messages",
"type": "integer",
Expand Down Expand Up @@ -17124,6 +17151,18 @@
"repliesOverride": {
"type": "boolean"
},
"quotedRepliesSetting": {
"description": "1: Don't notify\n2: Notify for all replies\n3: Notify for replies with mentions",
"type": "integer",
"enum": [
1,
2,
3
]
},
"quotedRepliesOverride": {
"type": "boolean"
},
"reactionsSetting": {
"description": "1: Don't notify\n2: Notify for reactions received on own messages\n3: Notify for reactions received on all messages",
"type": "integer",
Expand Down Expand Up @@ -17210,6 +17249,15 @@
3
]
},
"groupQuotedReplies": {
"description": "1: Don't notify\n2: Notify for all replies\n3: Notify for replies with mentions",
"type": "integer",
"enum": [
1,
2,
3
]
},
"groupReactions": {
"description": "1: Don't notify\n2: Notify for reactions received on own messages\n3: Notify for reactions received on all messages",
"type": "integer",
Expand Down Expand Up @@ -17298,6 +17346,15 @@
3
]
},
"oneOnOneQuotedReplies": {
"description": "1: Don't notify\n2: Notify for all replies\n3: Notify for replies with mentions",
"type": "integer",
"enum": [
1,
2,
3
]
},
"oneOnOneReactions": {
"description": "1: Don't notify\n2: Notify for reactions received on own messages\n3: Notify for reactions received on all messages",
"type": "integer",
Expand Down
16 changes: 16 additions & 0 deletions notifications/preferences.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ As the name suggests, these preferences help you to configure Notifications for
| --------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| Conversations | New messages | • Don't notify<br/>• **Notify for all messages (Default)** <br/>• Notify for messages with mentions | • **Yes (Default)**<br/>• No |
| | New replies | • Don't notify<br/>• **Notify for all replies (Default)**<br/>• Notify for replies with mentions | • **Yes (Default)**<br/>• No |
| | New quoted replies | • Don't notify<br/>• **Notify for all replies (Default)**<br/>• Notify for replies with mentions | • **Yes (Default)**<br/>• No |
| Message actions | Message is edited | • Don't notify<br/>• **Notify (Default)** | • Yes<br/>• **No (Default)** |
| | Message is deleted | • Don't notify<br/>• **Notify (Default)** | • Yes<br/>• **No (Default)** |
| | Message receives a reaction | • Don't notify<br/>• Notify for reactions received on all messages<br/>• **Notify for reactions received on own messages (Default)** | • **Yes (Default)**<br/>• No |
Expand Down Expand Up @@ -85,6 +86,7 @@ const groupPreferences = preferences.getGroupPreferences();

const groupMessagesPreference = groupPreferences.getMessagesPreference();
const groupRepliesPreference = groupPreferences.getRepliesPreference();
const groupQuotedRepliesPreference = groupPreferences.getQuotedRepliesPreference();
const groupReactionsPreference = groupPreferences.getReactionsPreference();
const memberLeftPreference = groupPreferences.getMemberLeftPreference();
const memberAddedPreference = groupPreferences.getMemberAddedPreference();
Expand All @@ -108,6 +110,7 @@ CometChatNotifications.fetchPreferences(new CometChat.CallbackListener<Notificat

MessagesOptions groupMessagesPreference = groupPreferences.getMessagesPreference();
RepliesOptions groupRepliesPreference = groupPreferences.getRepliesPreference();
RepliesOptions groupQuotedRepliesPreference = groupPreferences.getQuotedRepliesPreference();
ReactionsOptions groupReactionsPreference = groupPreferences.getReactionsPreference();
MemberActionsOptions memberAddedPreference = groupPreferences.getMemberAddedPreference();
MemberActionsOptions memberLeftPreference = groupPreferences.getMemberLeftPreference();
Expand Down Expand Up @@ -161,6 +164,7 @@ CometChatNotifications.fetchPreferences(

MessagesOptions? messagesPreference = groupPreferences?.messages;
RepliesOptions? repliesPreference = groupPreferences?.replies;
RepliesOptions? quotedRepliesPreference = groupPreferences?.quotedReplies;
ReactionsOptions? reactionsPreference = groupPreferences?.reactions;
MemberActionsOptions? memberAddedPreference = groupPreferences?.memberAdded;
MemberActionsOptions? memberJoinedPreference = groupPreferences?.memberJoined;
Expand Down Expand Up @@ -208,6 +212,7 @@ const groupPreferences = new GroupPreferences();
// Change group preferences
groupPreferences.setMessagesPreference(MessagesOptions.DONT_SUBSCRIBE);
groupPreferences.setRepliesPreference(RepliesOptions.DONT_SUBSCRIBE);
groupPreferences.setQuotedRepliesPreference(RepliesOptions.DONT_SUBSCRIBE);
groupPreferences.setReactionsPreference(ReactionsOptions.DONT_SUBSCRIBE);
groupPreferences.setMemberAddedPreference(MemberActionsOptions.SUBSCRIBE);
groupPreferences.setMemberKickedPreference(MemberActionsOptions.SUBSCRIBE);
Expand Down Expand Up @@ -242,6 +247,7 @@ GroupPreferences groupPreferences = new GroupPreferences();
// Change group preferences
groupPreferences.setMessagesPreference(MessagesOptions.DONT_SUBSCRIBE);
groupPreferences.setRepliesPreference(RepliesOptions.DONT_SUBSCRIBE);
groupPreferences.setQuotedRepliesPreference(RepliesOptions.DONT_SUBSCRIBE);
groupPreferences.setReactionsPreference(ReactionsOptions.DONT_SUBSCRIBE);
groupPreferences.setMemberAddedPreference(MemberActionsOptions.SUBSCRIBE);
groupPreferences.setMemberKickedPreference(MemberActionsOptions.SUBSCRIBE);
Expand Down Expand Up @@ -283,6 +289,7 @@ let groupPreferences = CometChatNotifications.GroupPreferences();
// Change group preferences
groupPreferences.set(messagesPreference: .DONT_SUBSCRIBE)
groupPreferences.set(repliesPreference: .DONT_SUBSCRIBE)
groupPreferences.set(quotedRepliesPreference: .DONT_SUBSCRIBE)
groupPreferences.set(reactionsPreference: .DONT_SUBSCRIBE)

groupPreferences.set(memberAddedPreference: .SUBSCRIBE)
Expand Down Expand Up @@ -316,6 +323,7 @@ NotificationPreferences updatedPreferences = NotificationPreferences();
GroupPreferences groupPreferences = GroupPreferences(
messages: MessagesOptions.SUBSCRIBE_TO_MENTIONS,
replies: RepliesOptions.SUBSCRIBE_TO_ALL,
quotedReplies: RepliesOptions.SUBSCRIBE_TO_ALL,
reactions: ReactionsOptions.SUBSCRIBE_TO_REACTIONS_ON_ALL_MESSAGES,
memberAdded: MemberActionsOptions.SUBSCRIBE,
memberJoined: MemberActionsOptions.SUBSCRIBE,
Expand Down Expand Up @@ -351,6 +359,7 @@ As the name suggests, these preferences help you to configure Notifications for
| --------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| Conversations | New messages | • Don't notify<br/>• **Notify for all messages (Default)**<br/>• Notify for messages with mentions | • **Yes (Default)**<br/>• No |
| | New replies | • Don't notify<br/>• **Notify for all replies (Default)**<br/>• Notify for replies with mentions | • **Yes (Default)**<br/>• No |
| | New quoted replies | • Don't notify<br/>• **Notify for all replies (Default)**<br/>• Notify for replies with mentions | • **Yes (Default)**<br/>• No |
| Message actions | Message is edited | • Don't notify<br/>• **Notify (Default)** | • Yes<br/>• **No (Default)** |
| | Message is deleted | • Don't notify<br/>• **Notify (Default)** | • Yes<br/>• **No (Default)** |
| | Message receives a reaction | • Don't notify<br/>• Notify for reactions received on all messages<br/>• **Notify for reactions received on own messages (Default)** | • **Yes (Default)**<br/>• No |
Expand Down Expand Up @@ -379,6 +388,7 @@ const oneOnOnePreferences = preferences.getOneOnOnePreferences();

const oneOnOneMessagesPreference = oneOnOnePreferences.getMessagesPreference();
const oneOnOneRepliesPreference = oneOnOnePreferences.getRepliesPreference();
const oneOnOneQuotedRepliesPreference = oneOnOnePreferences.getQuotedRepliesPreference();
const oneOnOneReactionsPreference =
oneOnOnePreferences.getReactionsPreference();
```
Expand All @@ -395,6 +405,7 @@ CometChatNotifications.fetchPreferences(new CometChat.CallbackListener<Notificat

MessagesOptions oneOnOneMessagesPreference = oneOnOnePreferences.getMessagesPreference();
RepliesOptions oneOnOneRepliesPreference = oneOnOnePreferences.getRepliesPreference();
RepliesOptions oneOnOneQuotedRepliesPreference = oneOnOnePreferences.getQuotedRepliesPreference();
ReactionsOptions oneOnOneReactionsPreference = oneOnOnePreferences.getReactionsPreference();
}

Expand Down Expand Up @@ -433,6 +444,7 @@ CometChatNotifications.fetchPreferences(

MessagesOptions? oneOnOneMessagesPreference = oneOnOnePreferences?.messages;
RepliesOptions? oneOnOneRepliesPreference = oneOnOnePreferences?.replies;
RepliesOptions? oneOnOneQuotedRepliesPreference = oneOnOnePreferences?.quotedReplies;
ReactionsOptions? oneOnOneReactionsPreference = oneOnOnePreferences?.reactions;
},
onError: (e) {
Expand Down Expand Up @@ -467,6 +479,7 @@ const oneOnOnePreferences = new OneOnOnePreferences();
// Change one-on-one preferences
oneOnOnePreferences.setMessagesPreference(MessagesOptions.DONT_SUBSCRIBE);
oneOnOnePreferences.setRepliesPreference(RepliesOptions.DONT_SUBSCRIBE);
oneOnOnePreferences.setQuotedRepliesPreference(RepliesOptions.DONT_SUBSCRIBE);
oneOnOnePreferences.setReactionsPreference(ReactionsOptions.DONT_SUBSCRIBE);

// Load the updates in the NotificationPreferences instance.
Expand All @@ -492,6 +505,7 @@ OneOnOnePreferences oneOnOnePreferences = new OneOnOnePreferences();
// Change one-on-one preferences
oneOnOnePreferences.setMessagesPreference(MessagesOptions.DONT_SUBSCRIBE);
oneOnOnePreferences.setRepliesPreference(RepliesOptions.DONT_SUBSCRIBE);
oneOnOnePreferences.setQuotedRepliesPreference(RepliesOptions.DONT_SUBSCRIBE);
oneOnOnePreferences.setReactionsPreference(ReactionsOptions.DONT_SUBSCRIBE);

// Load the updates in the NotificationPreferences instance.
Expand Down Expand Up @@ -526,6 +540,7 @@ let oneOnOnePreferences = CometChatNotifications.OneOnOnePreferences();
// Change one-on-one preferences
oneOnOnePreferences.set(messagesPreference: .DONT_SUBSCRIBE)
oneOnOnePreferences.set(repliesPreference: .DONT_SUBSCRIBE)
oneOnOnePreferences.set(quotedRepliesPreference: .DONT_SUBSCRIBE)
oneOnOnePreferences.set(reactionsPreference: .DONT_SUBSCRIBE)

// Load the updates in the NotificationPreferences instance.
Expand All @@ -552,6 +567,7 @@ NotificationPreferences updatedPreferences = NotificationPreferences();
OneOnOnePreferences oneOnOnePreferences = OneOnOnePreferences(
messages: MessagesOptions.SUBSCRIBE_TO_ALL,
replies: RepliesOptions.SUBSCRIBE_TO_MENTIONS,
quotedReplies: RepliesOptions.SUBSCRIBE_TO_MENTIONS,
reactions: ReactionsOptions.SUBSCRIBE_TO_REACTIONS_ON_ALL_MESSAGES);

// Load the updates in the NotificationPreferences instance.
Expand Down
Loading