Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing ts field #39

Open
glensc opened this issue May 31, 2023 · 3 comments
Open

Missing ts field #39

glensc opened this issue May 31, 2023 · 3 comments

Comments

@glensc
Copy link

glensc commented May 31, 2023

Trying to update from 0.1.6 to 2.0.6 and getting a type error for ts field:

  slack.send({
    channel,
    icon_emoji: iconEmoji || ":checkered_flag:",
    username: "CI",
    text: title,
    attachments: [
      {
        ts: moment().unix(),
        color,
        fields,
      },
    ],
  });

so, I guessed the field may be top level, but not allowed there either. haven't consulted slack docs yet.

@castilloandres
Copy link

@andrewchilds any news on this issue? I am also keen to send further information with Slack Threads but the ts field does not seem to be available in the library :/

The ts parameter represents the parent message id. Further information in the Slack docs:

@andrewchilds
Copy link
Owner

@castilloandres according to the documentation you linked, you need to be sending thread_ts. Did you try that?

@glensc
Copy link
Author

glensc commented Feb 2, 2024

I'm using ts on the attachment field, and it works. it's field for timestamp, not thread.

I had to cast as any for typescript to allow it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants