Skip to content

Commit

Permalink
Attempt to fix whitespace in slash command sent from mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwofford committed Feb 8, 2022
1 parent 1c13753 commit 861f6cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/interactions/airtable.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { getInfoForUser, transcript } from '../utils'

export default async (bot, message) => {
try {
const taggedUserID = (message.text.match(/<@([a-zA-Z0-9]*)|/) || [])[1]
const taggedUserID = (message.text.trim().match(/<@([a-zA-Z0-9]*)|/) || [])[1]
console.log({message_text: message.text})

if (!taggedUserID) {
throw new Error('No user was tagged in the message!')
Expand Down

0 comments on commit 861f6cb

Please sign in to comment.