diff --git a/lib/services.js b/lib/services.js index ac89931..2d52240 100644 --- a/lib/services.js +++ b/lib/services.js @@ -77,8 +77,8 @@ export function handleSubscription(request, reply) { const io = request.server.app.io; const client = request.server.app.client; - if (request.method === 'get' && request.query['hub.verify_token'] === verifyToken) { - return reply(request.query['hub.challenge']); + if (request.method === 'get' && request.query.hub.mode === 'subscribe' && request.query.hub.verify_token === verifyToken) { + return reply(request.query.hub.challenge); } // instagram provides 20 most recent