Skip to content

Commit

Permalink
addressing review comment re: small tweak to example
Browse files Browse the repository at this point in the history
  • Loading branch information
filmaj committed Oct 2, 2024
1 parent 4820052 commit 0a6c21a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/getting-started-typescript/src/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ app.action<BlockAction>({ action_id: 'select_user', block_id: 'assign_ticket' },
await ack();
try {
// Make sure the event is not in a view
if (body.message) {
if (body.message && body.channel) {
await client.reactions.add({
name: 'white_check_mark',
timestamp: body.message?.ts,
channel: body.channel!.id, // if the body has a message, we know it has a channel, too.
timestamp: body.message.ts,
channel: body.channel.id, // if the body has a message, we know it has a channel, too.
});
}
} catch (error) {
Expand Down

0 comments on commit 0a6c21a

Please sign in to comment.