Skip to content

Commit

Permalink
store channel_type in db payload
Browse files Browse the repository at this point in the history
  • Loading branch information
bdb-dd committed Mar 19, 2024
1 parent 1199036 commit 0b05871
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/slack-app/src/utils/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export class SlackContext extends Data {
channel: string = '';
team: string = '';
user: string = '';
channel_type: string = '';
time_utc: string = '';
}

Expand All @@ -16,6 +17,7 @@ export function getEventContext(evt: GenericMessageEvent): SlackContext {
ts: evt.ts,
thread_ts: evt.thread_ts,
channel: evt.channel,
channel_type: evt.channel_type,
team: evt.team,
user: evt.user,
time_utc: tsToTimestamptz(evt.ts),
Expand Down Expand Up @@ -43,6 +45,7 @@ export function getThreadResponseContext(item: SlackContext, responseTs: string)
ts: responseTs,
thread_ts: item.thread_ts,
channel: item.channel,
channel_type: item.channel_type,
team: item.team,
user: item.user,
time_utc: UtcNowTimestamptz(),
Expand All @@ -57,6 +60,7 @@ export function getReactionItemContext(eventBody: any): SlackContext {
ts: item.ts,
thread_ts: item.thread_ts,
channel: item.channel,
channel_type: item.channel_type,
team: item.team,
user: item.user,
time_utc: item.event_time_utc,
Expand Down

0 comments on commit 0b05871

Please sign in to comment.