slack-api-docs icon indicating copy to clipboard operation
slack-api-docs copied to clipboard

dnd.setSnooze indefinitely does not seem to work

Open jhp0621 opened this issue 3 years ago • 0 comments

Hello,

I am calling dnd.setSnooze with argument is_indefinite: true (+ user token that has dnd:write scope enabled), and although I'm not getting any errors, the response has snooze_enabled: false which I expect it to be true.. Is there a way to turn on DND mode for the user indefinitely?

app.client.dnd
   .setSnooze({
           token: process.env.SLACK_USER_TOKEN,
           is_indefinite: true,
    }).then(res => console.log(res))

res:

{
  ok: true,
  snooze_enabled: false,
  response_metadata: {
    scopes: [
      'identify',
      'users:read',
      'users:read.email',
      'dnd:read',
      'dnd:write'
    ],
    acceptedScopes: [ 'dnd:write' ]
  }
}

jhp0621 avatar Nov 15 '22 23:11 jhp0621