slackhq / slack-api-docs

API Docs for Slack.com
https://api.slack.com/
426 stars 85 forks source link

dnd.setSnooze indefinitely does not seem to work #112

Open jhp0621 opened 1 year ago

jhp0621 commented 1 year ago

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' ]
  }
}