Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilianodelgado committed Sep 22, 2020
1 parent 0e2f810 commit 5f329e0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "always"],
"camelcase": [1, {"properties": "never"}],
"eqeqeq": [1, "smart"],
"handle-callback-err": [1, "^(err|error|anySpecificError)$" ]
"camelcase": [0, {"properties": "never"}],
"eqeqeq": [0, "smart"],
"handle-callback-err": [0, "^(err|error|anySpecificError)$" ]
}
}
23 changes: 14 additions & 9 deletions utils/handles.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,27 @@ const postback = (senderId, event) => {
signale.note('OPTION 2 PAYLOAD');
break;
case 'GET_ID_MESSENGER_PAYLOAD':
const messageData = {
recipient: {
id: senderId
},
message: {
text: `Your messenger id is *${senderId}* and you can try other functions from *${serverUrl}/api-docs*`
}
};
functions.sendMessage(messageData);
getUserID(senderId);
break;
default:
signale.info('default postback');
break;
}
};

// Get ID
const getUserID = senderId => {
const messageData = {
recipient: {
id: senderId
},
message: {
text: `Your messenger id is *${senderId}* and you can try other functions from *${serverUrl}/api-docs*`
}
};
functions.sendMessage(messageData);
};

// HANDLE QUICK REPLY
const quickReply = (senderId, event) => {
signale.note('HANDLE QUICK-REPLY');
Expand Down

0 comments on commit 5f329e0

Please sign in to comment.