Skip to content

Commit d93191e

Browse files
authored
Fixes slack DM (#1304)
Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
1 parent d1f3cb1 commit d93191e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

slack/actions/deco-chat/channels/invoke.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ export default async function invoke(
1414
if (challenge) {
1515
return { challenge };
1616
}
17-
18-
const [channel, thread] = props.type === "event_callback"
19-
? [props.event.user, props.event.channel]
17+
const [channel, thread] = props.event.channel_type === "im"
18+
? [ctx.botUserId ?? props.event.channel, props.event.user]
2019
: [props.event.channel, props.event.channel];
2120
const linkProps =
2221
await ctx.appStorage.getItem<JoinChannelProps & { installId: string }>(

slack/mod.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export interface SlackWebhookPayload {
3737
team: string;
3838
channel: string;
3939
ts: string;
40+
channel_type: string;
4041
};
4142
}
4243

0 commit comments

Comments
 (0)