diff src/twitter.coffee @ 4:f352c74a6a5b

remove typeof, corrected facebooks toESN entrys
author Mathias Gebbe <mgebbe@intevation.de>
date Fri, 06 Jun 2014 10:18:14 +0200
parents 98a070c98982
children af9f5b94c019
line wrap: on
line diff
--- a/src/twitter.coffee	Thu Jun 05 18:02:25 2014 +0200
+++ b/src/twitter.coffee	Fri Jun 06 10:18:14 2014 +0200
@@ -86,7 +86,6 @@
 
     sync: (user) ->
       me = user.user_pumpio
-      id = user.user_ESN.substr(0,user.user_ESN.indexOf('@'))
       token = user.oauth_token
       secret = user.extra_token
       util = require("util")
@@ -98,13 +97,6 @@
         access_token_secret: secret
       )
 
-      #twit.verifyCredentials((data) ->
-      #  console.log util.inspect(data)
-      #  return
-      #).updateStatus "Test tweet from pumpbridge using " + twitter.VERSION, (data) ->
-      #  console.log util.inspect(data)
-      #  return
-
       # GET PUBLIC PUMP POSTS AND POST THEM
       async.waterfall [
         (callback) ->
@@ -117,6 +109,7 @@
             if (post.verb is "post" or post.verb is "share") and (post.object.objectType is "note" or post.object.objectType is "image") and (Pump.isPublicActivity(post)) and (typeof post.object.deleted is "undefined")
               ToESN.search {uid: post.object.id + "@twitter"}, (err, result) ->
                 if result.length is 0
+                  # post to twitter
                   text = post.object.content.replace(/<(?:.|\n)*?>/gm, '')
                   status = ""
                   if text.length <= 140
@@ -145,7 +138,6 @@
           ), (err) ->
             callback null, 'done'
       ],(err, result) ->
-            #console.log 'done.'
     
       return
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)