fb-chat-api-buttons
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -19,2 +19,3 @@ "use strict"; | ||
const beingPrefetched = req.headers['user-agent'] === 'facebookexternalhit/1.1'; | ||
console.log(beingPrefetched); | ||
this.emit(beingPrefetched ? 'being-prefetched' : 'click', json); | ||
@@ -36,5 +37,5 @@ res.send(link_1.linkView(!beingPrefetched && json)); | ||
const url = utils_1.getUrl(endpoint, btn, threadId); | ||
api.sendMessage({ body: url }, threadId); | ||
api.sendMessage({ url }, threadId); | ||
} | ||
} | ||
exports.ChatButtons = ChatButtons; |
{ | ||
"name": "fb-chat-api-buttons", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "🤖 Provides slightly better UX for your facebook chat bot by adding interactive buttons.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -21,3 +21,3 @@ import { NextFunction, Request, Response } from 'express'; | ||
const url = getUrl(endpoint, btn, threadId); | ||
api.sendMessage({ body: url }, threadId); | ||
api.sendMessage({ url }, threadId); | ||
} | ||
@@ -34,2 +34,4 @@ | ||
console.log(beingPrefetched); | ||
this.emit(beingPrefetched ? 'being-prefetched' : 'click', json); | ||
@@ -36,0 +38,0 @@ |
17608
399