Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwofford committed Sep 6, 2019
1 parent 0e14955 commit ca24c99
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/interactions/meetingTutorial.js
@@ -1,19 +1,20 @@
import { airRecord, airPatch } from '../utils'
import { userRecord, airPatch } from '../utils'

const interactionMeetingTutorial = (bot, message) => {
const { user } = message
console.log('Running meeting tutorial')

airRecord(user).then(userRecord => {
userRecord(user).then(userRecord => {
const oldRecordData = JSON.parse(userRecord.fields['Data'])
if (oldRecordData['Flag: Initiated tutorial']) {
bot.whisper(message, `Hmmm.... looks like we've already started this tutorial`)
} else {
bot.whisper(message, `Hey <@${user}>! Welcome to the check-in tutorial. First I'll need to know when your first meeting is. Run this command to let me know: \`/meeting-time next wednesday at 4 PM\``)
bot.whisper(message, "(If you don't know when your first meeting will be, just set it for a couple weeks for now so we can get through the tutorial, then you can change it later)")
}
const newRecordData = JSON.parse(userRecord.fields['Data'])
const newRecordData = oldRecordData
newRecordData['Flag: Initiated tutorial'] = true

airPatch('Orpheus', userRecord.id, JSON.stringify(newRecordFields)).then((newRecord) => {
console.log('patching...')
}).catch(err => { throw err })
Expand Down

0 comments on commit ca24c99

Please sign in to comment.