Skip to content

Commit ae94055

Browse files
committed
print out debug message for Direct message flow
1 parent dd0942f commit ae94055

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,16 @@ app.view('mermaid-modal-submitted', async ({ ack, body, logger, client }) => {
115115

116116
// Check for direct message
117117
if (origin.channel.startsWith('D')) {
118+
logger.info('Direct message detected');
118119
try {
119120
const userChannel = await client.conversations.open({
120121
users: origin.user_id,
121122
});
122123
channelToUpload = userChannel.channel?.id
123124
? userChannel.channel.id
124125
: channelToUpload;
126+
logger.info('User channel', userChannel);
127+
logger.info('Channel selected', channelToUpload);
125128
} catch (error) {
126129
logger.error('Failed to open an user channel, but continuing', error);
127130
}

src/init/customRoutes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as path from 'path';
33
import { type CustomRoute } from '@slack/bolt';
44

55
const indexHTML = fs.readFileSync(
6-
path.resolve(__dirname, '../public/index.html')
6+
path.resolve(__dirname, '../../public/index.html')
77
);
88

99
const customRoutes: CustomRoute[] = [

0 commit comments

Comments
 (0)