mirror of
				https://github.com/node-red/node-red-nodes.git
				synced 2025-03-01 10:37:43 +00:00 
			
		
		
		
	added msg.params as an option for twitter out node
This commit is contained in:
		@@ -204,6 +204,9 @@
 | 
			
		||||
    <p>To send a Direct Message (DM) - use a payload like "D {username} {message}"</p>
 | 
			
		||||
    <p>If <b>msg.media</b> exists and is a Buffer object, this node will treat it
 | 
			
		||||
       as an image and attach it to the tweet.</p>
 | 
			
		||||
    <p>If <b>msg.params</b> exists and is a set of field: value pairs, this node will treat it as 
 | 
			
		||||
       parameters for the update request</p>
 | 
			
		||||
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<script type="text/javascript">
 | 
			
		||||
 
 | 
			
		||||
@@ -313,7 +313,8 @@ module.exports = function(RED) {
 | 
			
		||||
                        form.append("media[]",msg.media,{filename:"image"});
 | 
			
		||||
 | 
			
		||||
                    } else {
 | 
			
		||||
                        twit.updateStatus(msg.payload, function (err, data) {
 | 
			
		||||
                        if (typeof msg.params === 'undefined') { msg.params = {};}
 | 
			
		||||
                        twit.updateStatus(msg.payload, msg.params, function (err, data) {
 | 
			
		||||
                            if (err) {
 | 
			
		||||
                                node.status({fill:"red",shape:"ring",text:RED._("twitter.status.failed")});
 | 
			
		||||
                                node.error(err,msg);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user