/* Query to check if the new status is posted with specific team_id */
var requestObject = {
type: "statuses",
body: {
query: {
match: {
"team_id": team_id
}
}
}
};
var statusBodyObject = {
"text": "@{{{user_name}}} is working on {{{status}}}"
}
var webhookObject = {
'method': 'POST',
'url': webhookUrl,
'body': statusBodyObject
}
appbaseRef.searchStreamToURL(requestObject, webhookObject).on('data', function(stream) {
console.log("Webhook initialized: ", JSON.stringify(stream))
}).on('error', function(error) {
console.log("Query error: ", JSON.stringify(error))
});
Here is my response:
It is always created: false even though I have different team_id value in the request object.
Here is my code:
Here is my response:
It is always created: false even though I have different team_id value in the request object.