let twitter node DM using D or d

to close #493
This commit is contained in:
Dave Conway-Jones 2018-10-01 17:31:18 +01:00
parent 6540439e5f
commit f74f3402e3
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
2 changed files with 2 additions and 2 deletions

View File

@ -566,7 +566,7 @@ module.exports = function(RED) {
node.on("input", function(msg) {
if (msg.hasOwnProperty("payload")) {
node.status({fill:"blue",shape:"dot",text:"twitter.status.tweeting"});
if (msg.payload.slice(0,2) == "D ") {
if (msg.payload.slice(0,2).toLowerCase() === "d ") {
var dm_user;
// direct message syntax: "D user message"
var t = msg.payload.match(/D\s+(\S+)\s+(.*)/).slice(1);

View File

@ -1,6 +1,6 @@
{
"name": "node-red-node-twitter",
"version": "1.1.2",
"version": "1.1.3",
"description": "A Node-RED node to talk to Twitter",
"dependencies": {
"twitter-ng": "0.6.2",