Skip to content

Push notifications can't be disabled via REST API #15221

Closed

Description

@DomiStyle

Description:

Trying to toggle the mobileNotifications attribute via the REST endpoint users.setPreferences will result in the changes being shown in the user settings but will not actually affect the sending of push notifications.

Steps to reproduce:

(Tested on Android, requires logged in device and Push working)

  1. Set the Push Mobile Notifications For to Nothing via the UI
  2. Close browser
  3. Write message to user
  4. Send the following POST request:
POST https://<rocket.chat host>/api/v1/users.setPreferences

X-Auth-Token: <token>
X-User-Id: <user id>
Content-Type: application/json

{
	"userId": "<user id to toggle>",
	"data":
	{
		"mobileNotifications": "default"
	}
}

Response:

{
    "user": {
        "_id": "<user id to toggle>",
        "settings": {
            "preferences": {
                "mobileNotifications": "default",
                "language": "en"
            }
        }
    },
    "success": true
}

(I know that this is a POST call and not PATCH/PUT and it will set all other settings to default but there is no PATCH/PUT in the documentation)

  1. Write message to user again

Expected behavior:

No push notification on first message, push notification on second message.

Actual behavior:

No push notification on either message. This works in both ways (enabling & disabling push via API). The user settings UI properly reflects the API change to default but the server is not applying it to the actual push messages.

Server Setup Information:

  • Version of Rocket.Chat Server: 2.0.0-rc.0 (has happened with older versions too)
  • Operating System: Ubuntu 18.04.2
  • Deployment Method: docker (rocketchat/rocket.chat:2.0.0-rc.0)
  • Number of Running Instances: 2
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: 8.11.4 - x64
  • MongoDB Version: 4.0.11

Additional context

Push notifications will start working again if you toggle to Nothing and then Default again via the UI after sending the API call.

I'm trying to implement a workaround for opening hours by toggling the mobile notifications for certain users at certain times.

I used the REST documentation found here. However, the values are not documented there so I took them from the user settings UI page directly. I couldn't find a better way to update just this one field for a user.

Relevant logs:

Disabling notifications via UI

rocketchat_1  | Meteor ➔ method private-settings/get -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 2019-08-21T08:13:18.717Z ]
rocketchat_1  | Meteor ➔ method saveUserPreferences -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ { newRoomNotification: 'door',
rocketchat_1  |     newMessageNotification: 'chime',
rocketchat_1  |     clockMode: 0,
rocketchat_1  |     useEmojis: true,
rocketchat_1  |     convertAsciiEmoji: true,
rocketchat_1  |     saveMobileBandwidth: true,
rocketchat_1  |     collapseMediaByDefault: false,
rocketchat_1  |     muteFocusedConversations: true,
rocketchat_1  |     hideUsernames: false,
rocketchat_1  |     messageViewMode: 0,
rocketchat_1  |     hideFlexTab: false,
rocketchat_1  |     hideAvatars: false,
rocketchat_1  |     sendOnEnter: 'normal',
rocketchat_1  |     autoImageLoad: true,
rocketchat_1  |     emailNotificationMode: 'mentions',
rocketchat_1  |     desktopNotificationDuration: 0,
rocketchat_1  |     desktopNotifications: 'default',
rocketchat_1  |     mobileNotifications: 'nothing',
rocketchat_1  |     unreadAlert: true,
rocketchat_1  |     sidebarShowDiscussion: true,
rocketchat_1  |     notificationsSoundVolume: 100,
rocketchat_1  |     roomCounterSidebar: false,
rocketchat_1  |     highlights: [],
rocketchat_1  |     dontAskAgainList: [],
rocketchat_1  |     hideRoles: false,
rocketchat_1  |     enableAutoAway: true,
rocketchat_1  |     idleTimeLimit: 300 } ]
rocketchat_1  | API ➔ debug GET: /api/v1/commands.list
rocketchat_1  | API ➔ debug Success { statusCode: 200,
rocketchat_1  |   body:
rocketchat_1  |    { commands:
rocketchat_1  |       [ [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object] ],
rocketchat_1  |      offset: 0,
rocketchat_1  |      count: 24,
rocketchat_1  |      total: 24,
rocketchat_1  |      success: true } }
rocketchat_1  | Meteor ➔ publish null -> userId: null , arguments:  []
rocketchat_1  | Meteor ➔ publish null -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ publish stream-importers -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'progress', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish webdavAccounts -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ publish userData -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method autoTranslate.getSupportedLanguages -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'en' ]
rocketchat_1  | Meteor ➔ method autoTranslate.getProviderUiMetadata -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method listCustomSounds -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method listEmojiCustom -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method getUserRoles -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method apps/is-enabled -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method listCustomUserStatus -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method loadLocale -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'de' ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'app/added', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'app/removed', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'app/updated', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'app/statusUpdate', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'app/settingUpdated', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'command/added', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'command/disabled', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'command/updated', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'command/removed', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ method public-settings/get -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 2019-08-21T08:12:58.412Z ]
rocketchat_1  | Meteor ➔ method rooms/get -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 2019-08-21T08:12:58.423Z ]
rocketchat_1  | API ➔ debug GET: /api/apps/languages
rocketchat_1  | API ➔ debug Success { statusCode: 200, body: { apps: [], success: true } }
rocketchat_1  | Meteor ➔ method subscriptions/get -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 2019-08-21T08:13:32.426Z ]
rocketchat_1  | API ➔ debug GET: /api/v1/users.presence
rocketchat_1  | API ➔ debug Success { statusCode: 200,
rocketchat_1  |   body:
rocketchat_1  |    { users: [ [Object], [Object], [Object] ],
rocketchat_1  |      full: true,
rocketchat_1  |      success: true } }

Sending message to user

rocketchat_1  | Meteor ➔ method readMessages -> userId: Td22fvrSy6JAoHqvY , arguments:  [ 'Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5' ]
rocketchat_1  | Meteor ➔ method sendMessage -> userId: Td22fvrSy6JAoHqvY , arguments:  [ { _id: '63zecPm2QpLnGShZF',
rocketchat_1  |     rid: 'Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5',
rocketchat_1  |     msg: 'Test' } ]
rocketchat_1  | Integrations ➔ Outgoing WebHook.debug Execute Trigger: sendMessage
rocketchat_1  | Integrations ➔ Outgoing WebHook.debug Got the event arguments for the event: sendMessage { event: 'sendMessage',
rocketchat_1  |   message:
rocketchat_1  |    { _id: '63zecPm2QpLnGShZF',
rocketchat_1  |      rid: 'Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5',
rocketchat_1  |      msg: 'Test',
rocketchat_1  |      ts: 2019-08-21T08:14:58.677Z,
rocketchat_1  |      u: { _id: 'Td22fvrSy6JAoHqvY', username: 'test-teacher' },
rocketchat_1  |      unread: true,
rocketchat_1  |      mentions: [],
rocketchat_1  |      channels: [],
rocketchat_1  |      _updatedAt: 2019-08-21T08:14:58.684Z },
rocketchat_1  |   room:
rocketchat_1  |    { _id: 'Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5',
rocketchat_1  |      _updatedAt: 2019-08-21T08:13:16.802Z,
rocketchat_1  |      msgs: 56,
rocketchat_1  |      t: 'd',
rocketchat_1  |      ts: 2019-08-09T08:14:32.800Z,
rocketchat_1  |      usernames: [ 'admin', 'test-teacher' ],
rocketchat_1  |      usersCount: 2,
rocketchat_1  |      lastMessage:
rocketchat_1  |       { _id: 'u56wJ2hjL9d28pDa4',
rocketchat_1  |         rid: 'Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5',
rocketchat_1  |         msg: 'asfasfasffs',
rocketchat_1  |         ts: 2019-08-21T08:12:59.530Z,
rocketchat_1  |         u: [Object],
rocketchat_1  |         mentions: [],
rocketchat_1  |         channels: [],
rocketchat_1  |         _updatedAt: 2019-08-21T08:12:59.539Z },
rocketchat_1  |      lm: 2019-08-21T08:12:59.530Z } }
rocketchat_1  | Integrations ➔ Outgoing WebHook.debug Starting search for triggers for the room: Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5
rocketchat_1  | Integrations ➔ Outgoing WebHook.debug Found 0 to iterate over and see if the match the event.
rocketchat_1  | SyncedCron ➔ info Starting "Generate download files for user data".
rocketchat_1  | SyncedCron ➔ info Finished "Generate download files for user data".
rocketchat_1  | SyncedCron ➔ info Not running "Generate download files for user data" again.
rocketchat_1  | SyncedCron ➔ info Not running "Generate download files for user data" again.
rocketchat_1  | SyncedCron ➔ info Not running "Generate download files for user data" again.

Enabling notifications via REST API

rocketchat_1  | API ➔ debug POST: /api/v1/users.setPreferences
rocketchat_1  | API ➔ debug Success { statusCode: 200,
rocketchat_1  |   body:
rocketchat_1  |    { user: { _id: 'vJZ83W9bBx65Xzws5', settings: [Object] },
rocketchat_1  |      success: true } }

Writing message to user (no push)

rocketchat_1  | Meteor ➔ method readMessages -> userId: Td22fvrSy6JAoHqvY , arguments:  [ 'Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5' ]
rocketchat_1  | Meteor ➔ method sendMessage -> userId: Td22fvrSy6JAoHqvY , arguments:  [ { _id: 'SxPwDtorf37RFAyhf',
rocketchat_1  |     rid: 'Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5',
rocketchat_1  |     msg: 'Test' } ]
rocketchat_1  | Integrations ➔ Outgoing WebHook.debug Execute Trigger: sendMessage
rocketchat_1  | Integrations ➔ Outgoing WebHook.debug Got the event arguments for the event: sendMessage { event: 'sendMessage',
rocketchat_1  |   message:
rocketchat_1  |    { _id: 'SxPwDtorf37RFAyhf',
rocketchat_1  |      rid: 'Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5',
rocketchat_1  |      msg: 'Test',
rocketchat_1  |      ts: 2019-08-21T08:15:40.404Z,
rocketchat_1  |      u: { _id: 'Td22fvrSy6JAoHqvY', username: 'test-teacher' },
rocketchat_1  |      unread: true,
rocketchat_1  |      mentions: [],
rocketchat_1  |      channels: [],
rocketchat_1  |      _updatedAt: 2019-08-21T08:15:40.412Z },
rocketchat_1  |   room:
rocketchat_1  |    { _id: 'Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5',
rocketchat_1  |      _updatedAt: 2019-08-21T08:14:58.699Z,
rocketchat_1  |      msgs: 57,
rocketchat_1  |      t: 'd',
rocketchat_1  |      ts: 2019-08-09T08:14:32.800Z,
rocketchat_1  |      usernames: [ 'admin', 'test-teacher' ],
rocketchat_1  |      usersCount: 2,
rocketchat_1  |      lastMessage:
rocketchat_1  |       { _id: '63zecPm2QpLnGShZF',
rocketchat_1  |         rid: 'Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5',
rocketchat_1  |         msg: 'Test',
rocketchat_1  |         ts: 2019-08-21T08:14:58.677Z,
rocketchat_1  |         u: [Object],
rocketchat_1  |         unread: true,
rocketchat_1  |         mentions: [],
rocketchat_1  |         channels: [],
rocketchat_1  |         _updatedAt: 2019-08-21T08:14:58.684Z },
rocketchat_1  |      lm: 2019-08-21T08:14:58.677Z } }
rocketchat_1  | Integrations ➔ Outgoing WebHook.debug Starting search for triggers for the room: Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5
rocketchat_1  | Integrations ➔ Outgoing WebHook.debug Found 0 to iterate over and see if the match the event.

Resetting to Default via UI (switch to None then to Default)

rocketchat_1  | Meteor ➔ method saveUserPreferences -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ { newRoomNotification: 'door',
rocketchat_1  |     newMessageNotification: 'chime',
rocketchat_1  |     clockMode: 0,
rocketchat_1  |     useEmojis: true,
rocketchat_1  |     convertAsciiEmoji: true,
rocketchat_1  |     saveMobileBandwidth: true,
rocketchat_1  |     collapseMediaByDefault: false,
rocketchat_1  |     muteFocusedConversations: true,
rocketchat_1  |     hideUsernames: false,
rocketchat_1  |     messageViewMode: 0,
rocketchat_1  |     hideFlexTab: false,
rocketchat_1  |     hideAvatars: false,
rocketchat_1  |     sendOnEnter: 'normal',
rocketchat_1  |     autoImageLoad: true,
rocketchat_1  |     emailNotificationMode: 'mentions',
rocketchat_1  |     desktopNotificationDuration: 0,
rocketchat_1  |     desktopNotifications: 'default',
rocketchat_1  |     mobileNotifications: 'nothing',
rocketchat_1  |     unreadAlert: true,
rocketchat_1  |     sidebarShowDiscussion: true,
rocketchat_1  |     notificationsSoundVolume: 100,
rocketchat_1  |     roomCounterSidebar: false,
rocketchat_1  |     highlights: [],
rocketchat_1  |     dontAskAgainList: [],
rocketchat_1  |     hideRoles: false,
rocketchat_1  |     enableAutoAway: true,
rocketchat_1  |     idleTimeLimit: 300 } ]
rocketchat_1  | API ➔ debug GET: /api/v1/commands.list
rocketchat_1  | API ➔ debug Success { statusCode: 200,
rocketchat_1  |   body:
rocketchat_1  |    { commands:
rocketchat_1  |       [ [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object] ],
rocketchat_1  |      offset: 0,
rocketchat_1  |      count: 24,
rocketchat_1  |      total: 24,
rocketchat_1  |      success: true } }
rocketchat_1  | Meteor ➔ publish null -> userId: null , arguments:  []
rocketchat_1  | Meteor ➔ publish null -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ publish stream-importers -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'progress', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish webdavAccounts -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ publish userData -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method autoTranslate.getSupportedLanguages -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'en' ]
rocketchat_1  | Meteor ➔ method autoTranslate.getProviderUiMetadata -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method listCustomSounds -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method listEmojiCustom -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method getUserRoles -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method apps/is-enabled -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method listCustomUserStatus -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method loadLocale -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'de' ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'app/added', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'app/removed', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'app/updated', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'app/statusUpdate', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'app/settingUpdated', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'command/added', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'command/disabled', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'command/updated', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'command/removed', { useCollection: false, args: [] } ]
rocketchat_1  | API ➔ debug GET: /api/apps/languages
rocketchat_1  | API ➔ debug Success { statusCode: 200, body: { apps: [], success: true } }
rocketchat_1  | Meteor ➔ method subscriptions/get -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 2019-08-21T08:15:40.435Z ]
rocketchat_1  | Meteor ➔ method public-settings/get -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 2019-08-21T08:17:12.244Z ]
rocketchat_1  | Meteor ➔ method rooms/get -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 2019-08-21T08:15:40.428Z ]
rocketchat_1  | API ➔ debug GET: /api/v1/users.presence
rocketchat_1  | API ➔ debug Success { statusCode: 200,
rocketchat_1  |   body:
rocketchat_1  |    { users: [ [Object], [Object], [Object] ],
rocketchat_1  |      full: true,
rocketchat_1  |      success: true } }
rocketchat_1  | Meteor ➔ method saveUserPreferences -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ { newRoomNotification: 'door',
rocketchat_1  |     newMessageNotification: 'chime',
rocketchat_1  |     clockMode: 0,
rocketchat_1  |     useEmojis: true,
rocketchat_1  |     convertAsciiEmoji: true,
rocketchat_1  |     saveMobileBandwidth: true,
rocketchat_1  |     collapseMediaByDefault: false,
rocketchat_1  |     muteFocusedConversations: true,
rocketchat_1  |     hideUsernames: false,
rocketchat_1  |     messageViewMode: 0,
rocketchat_1  |     hideFlexTab: false,
rocketchat_1  |     hideAvatars: false,
rocketchat_1  |     sendOnEnter: 'normal',
rocketchat_1  |     autoImageLoad: true,
rocketchat_1  |     emailNotificationMode: 'mentions',
rocketchat_1  |     desktopNotificationDuration: 0,
rocketchat_1  |     desktopNotifications: 'default',
rocketchat_1  |     mobileNotifications: 'default',
rocketchat_1  |     unreadAlert: true,
rocketchat_1  |     sidebarShowDiscussion: true,
rocketchat_1  |     notificationsSoundVolume: 100,
rocketchat_1  |     roomCounterSidebar: false,
rocketchat_1  |     highlights: [],
rocketchat_1  |     dontAskAgainList: [],
rocketchat_1  |     hideRoles: false,
rocketchat_1  |     enableAutoAway: true,
rocketchat_1  |     idleTimeLimit: 300 } ]
rocketchat_1  | API ➔ debug GET: /api/v1/commands.list
rocketchat_1  | API ➔ debug Success { statusCode: 200,
rocketchat_1  |   body:
rocketchat_1  |    { commands:
rocketchat_1  |       [ [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object],
rocketchat_1  |         [Object] ],
rocketchat_1  |      offset: 0,
rocketchat_1  |      count: 24,
rocketchat_1  |      total: 24,
rocketchat_1  |      success: true } }
rocketchat_1  | Meteor ➔ publish null -> userId: null , arguments:  []
rocketchat_1  | Meteor ➔ publish null -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ publish stream-importers -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'progress', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish webdavAccounts -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ publish userData -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method autoTranslate.getSupportedLanguages -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'en' ]
rocketchat_1  | Meteor ➔ method autoTranslate.getProviderUiMetadata -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method listCustomSounds -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method listEmojiCustom -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method getUserRoles -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method apps/is-enabled -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method listCustomUserStatus -> userId: vJZ83W9bBx65Xzws5 , arguments:  []
rocketchat_1  | Meteor ➔ method loadLocale -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'de' ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'app/added', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'app/removed', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'app/updated', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'app/statusUpdate', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'app/settingUpdated', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'command/added', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'command/disabled', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'command/updated', { useCollection: false, args: [] } ]
rocketchat_1  | Meteor ➔ publish stream-apps -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 'command/removed', { useCollection: false, args: [] } ]
rocketchat_1  | API ➔ debug GET: /api/apps/languages
rocketchat_1  | API ➔ debug Success { statusCode: 200, body: { apps: [], success: true } }
rocketchat_1  | Meteor ➔ method public-settings/get -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 2019-08-21T08:17:31.179Z ]
rocketchat_1  | Meteor ➔ method rooms/get -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 2019-08-21T08:17:31.191Z ]
rocketchat_1  | Meteor ➔ method subscriptions/get -> userId: vJZ83W9bBx65Xzws5 , arguments:  [ 2019-08-21T08:18:05.214Z ]
rocketchat_1  | API ➔ debug GET: /api/v1/users.presence
rocketchat_1  | API ➔ debug Success { statusCode: 200,
rocketchat_1  |   body:
rocketchat_1  |    { users: [ [Object], [Object], [Object] ],
rocketchat_1  |      full: true,
rocketchat_1  |      success: true } }

Send another message (push is sent properly)

rocketchat_1  | Meteor ➔ method readMessages -> userId: Td22fvrSy6JAoHqvY , arguments:  [ 'Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5' ]
rocketchat_1  | Meteor ➔ method sendMessage -> userId: Td22fvrSy6JAoHqvY , arguments:  [ { _id: 'Tvg5yh8kiyEHmstwX',
rocketchat_1  |     rid: 'Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5',
rocketchat_1  |     msg: 'Test' } ]
rocketchat_1  | Integrations ➔ Outgoing WebHook.debug Execute Trigger: sendMessage
rocketchat_1  | Integrations ➔ Outgoing WebHook.debug Got the event arguments for the event: sendMessage { event: 'sendMessage',
rocketchat_1  |   message:
rocketchat_1  |    { _id: 'Tvg5yh8kiyEHmstwX',
rocketchat_1  |      rid: 'Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5',
rocketchat_1  |      msg: 'Test',
rocketchat_1  |      ts: 2019-08-21T08:19:07.216Z,
rocketchat_1  |      u: { _id: 'Td22fvrSy6JAoHqvY', username: 'test-teacher' },
rocketchat_1  |      unread: true,
rocketchat_1  |      mentions: [],
rocketchat_1  |      channels: [],
rocketchat_1  |      _updatedAt: 2019-08-21T08:19:07.223Z },
rocketchat_1  |   room:
rocketchat_1  |    { _id: 'Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5',
rocketchat_1  |      _updatedAt: 2019-08-21T08:15:40.428Z,
rocketchat_1  |      msgs: 58,
rocketchat_1  |      t: 'd',
rocketchat_1  |      ts: 2019-08-09T08:14:32.800Z,
rocketchat_1  |      usernames: [ 'admin', 'test-teacher' ],
rocketchat_1  |      usersCount: 2,
rocketchat_1  |      lastMessage:
rocketchat_1  |       { _id: 'SxPwDtorf37RFAyhf',
rocketchat_1  |         rid: 'Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5',
rocketchat_1  |         msg: 'Test',
rocketchat_1  |         ts: 2019-08-21T08:15:40.404Z,
rocketchat_1  |         u: [Object],
rocketchat_1  |         unread: true,
rocketchat_1  |         mentions: [],
rocketchat_1  |         channels: [],
rocketchat_1  |         _updatedAt: 2019-08-21T08:15:40.412Z },
rocketchat_1  |      lm: 2019-08-21T08:15:40.404Z } }
rocketchat_1  | Integrations ➔ Outgoing WebHook.debug Starting search for triggers for the room: Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5
rocketchat_1  | Integrations ➔ Outgoing WebHook.debug Found 0 to iterate over and see if the match the event.
rocketchat_1  | Push: Send message "Teacher 1" via query { userId: 'vJZ83W9bBx65Xzws5' }
rocketchat_1  | send to token { gcm: '<snip>' }
rocketchat_1  | sendGCM [ '<snip>' ] { _id: '<snip>',
rocketchat_1  |   createdAt: 2019-08-21T08:19:07.280Z,
rocketchat_1  |   createdBy: '<SERVER>',
rocketchat_1  |   from: 'push',
rocketchat_1  |   title: 'Teacher 1',
rocketchat_1  |   text: ' ',
rocketchat_1  |   payload:
rocketchat_1  |    { host: 'https://<snip>/',
rocketchat_1  |      rid: 'Td22fvrSy6JAoHqvYvJZ83W9bBx65Xzws5',
rocketchat_1  |      sender: { _id: 'Td22fvrSy6JAoHqvY', username: 'test-teacher' },
rocketchat_1  |      type: 'd',
rocketchat_1  |      messageId: 'Tvg5yh8kiyEHmstwX' },
rocketchat_1  |   badge: 3,
rocketchat_1  |   sound: 'default',
rocketchat_1  |   notId: 1508969502,
rocketchat_1  |   apn: { category: 'MESSAGE' },
rocketchat_1  |   gcm:
rocketchat_1  |    { image: 'https://<snip>/images/logo/android-chrome-192x192.png',
rocketchat_1  |      style: 'inbox',
rocketchat_1  |      summaryText: '%n% new messages' },
rocketchat_1  |   query: { userId: 'vJZ83W9bBx65Xzws5' },
rocketchat_1  |   sent: false,
rocketchat_1  |   sending: 0,
rocketchat_1  |   image: 'https://<snip>/images/logo/android-chrome-192x192.png',
rocketchat_1  |   style: 'inbox',
rocketchat_1  |   summaryText: '%n% new messages' }
rocketchat_1  | Create GCM Sender using "<snip>"
rocketchat_1  | A:Send message to: <snip>
rocketchat_1  | Push: Sent message "Teacher 1" to 0 ios apps 1 android apps
rocketchat_1  | Push, GUIDE: The "Push.appCollection" - No APN clients have registred on the server yet...
rocketchat_1  | ANDROID: Result of sender: {"multicast_id":<snip>,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"<snip>"}]}

Activity

  1. col-panic commented on Aug 27, 2019

    @col-panic
    Contributor

    There seems to be the same behaviour e.g. for posting LDAP_Enable in settings https://rocket.chat/docs/developer-guides/rest-api/settings/update/ with true. The value is set, but LDAP itself is not activated. If I perform the same action via the browser in the preferences, it actually gets activated.

  2. MarcosSpessatto commented on Aug 30, 2019

    @MarcosSpessatto
    Contributor

    @DomiStyle I created a PR to fix the behavior of overriding all preferences. But based on what you said, note that there are 3 types of preferences: server preferences, room preferences and finally user preferences, with room preference being the most important, followed by user preference and finally server preference.

  3. added this to the 2.1.0 milestone on Aug 30, 2019
  4. DomiStyle commented on Sep 2, 2019

    @DomiStyle
    Author

    @MarcosSpessatto Does this also fix the setting not actually being used by the server or just makes the API route behave like a PATCH request?

  5. MarcosSpessatto commented on Sep 4, 2019

    @MarcosSpessatto
    Contributor

    @DomiStyle yes, it will fix the problem as well.

  6. DomiStyle commented on Sep 4, 2019

    @DomiStyle
    Author

    @MarcosSpessatto Perfect, thanks a lot.

  7. Abhi0229 commented on Aug 2, 2026

    @Abhi0229

    Hi! I'd like to work on this issue if it's still available.
    I'll investigate the UI component causing the poor contrast, implement a fix, and submit a PR once it's tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions