seratch / slack-edge

Slack app development framework for edge functions with streamlined TypeScript support
https://github.com/seratch/slack-edge-app-template
MIT License
87 stars 5 forks source link

Create TombstoneMessageEvent #10

Closed zhawtof closed 8 months ago

zhawtof commented 8 months ago

Why?

The tombstone event can be triggered when a message is deleted that contains threaded replies. As I have used the app, I've seen it show in both MessageDeletedEvent and MessageChangedEvent. Therefore, it should be part of AnyMessageItem.

References (search for tombstone):

Actual example from one of my slack apps:

{
  type: 'message',
  subtype: 'message_deleted',
  previous_message: {
    type: 'message',
    subtype: 'tombstone',
    text: 'This message was deleted.',
    user: 'USLACKBOT',
    hidden: true,
    ts: '1704604884.175949',
    thread_ts: '1704604884.175949',
    parent_user_id: 'USLACKBOT',
    reply_count: 0,
    reply_users_count: 0,
    latest_reply: '0000000000.000000',
    reply_users: [],
    is_locked: false,
    subscribed: false
  },
  channel: 'C061C15S0E5',
  hidden: true,
  deleted_ts: '1704604884.175949',
  event_ts: '1704604959.000800',
  ts: '1704604959.000800',
  channel_type: 'channel'
}

Additional Note

This gap should also be brought up with the Slack technical documentation team as it should be mentioned more explicitly in the API documentation.

seratch commented 8 months ago

Thank you!

seratch commented 8 months ago

Thanks for the contribution. I'll release a new version within a few hours.