Skip to content

[BUG] Scheduled Messages list issues with slack cli app #465

@mateopozor02

Description

@mateopozor02

The deno-slack versions

"deno-slack-sdk/": "https://deno.land/x/[email protected]/",
"deno-slack-api/": "https://deno.land/x/[email protected]/",

Deno runtime version

deno 1.46.2 (stable, release, x86_64-unknown-linux-gnu)
v8 12.9.202.5-rusty
typescript 5.5.2

OS info

#25~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 15 17:20:50 UTC 2

Describe the bug

When developing a Slack app using the Slack CLI, the client.chat.scheduledMessages.list method appears to silently fail inside Slack Functions. It returns a successful response, but the scheduled_messages list is empty—even immediately after a successful client.chat.scheduleMessage call for the same channel.

Steps to reproduce

  1. Run your project with slack run
  2. Trigger a function that schedules a message to a channel (client.chat.scheduleMessage)
  3. Get a successful API response for scheduling
  4. In the same function, call client.chat.ScheduledMessages.list for the same channel
  5. Get successful response but an empty list of scheduled messages

Minimal fuction to try this:

async function testScheduledMessages(
  params: ChatScheduleMessageParams,
  client: SlackAPIClient,
) {
  // Trying to send a plaintext in the params 
  const plaintextPost = await client.chat.scheduleMessage({
    channel: params.channel,
    text: "THIS IS A TEST SCHEDULED MESSAGE",
    post_at: params.post_at,
  });

  console.log("Plaintext Post Response:", plaintextPost);

  // Show the scheduled message list 
  const scheduledMessages = await client.chat.scheduledMessages.list({
    channel: params.channel,
  });

  console.log("List of Scheduled Messages:", scheduledMessages);
}

Expected result

After successfully scheduling the message and calling client.chat.scheduledMessages.list, it should be shown in the list of scheduled messages from the response.

Actual result

After successfully scheduling the message, the result of client.chat.scheduleMessages.list is successful, but the list is empty.

Image

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions