diff src/syncALONE.coffee @ 30:3e3fa35e3ce2

twitter sync likes, recommend mongodb configure pump2twitter, twitter2pump in webui
author Mathias Gebbe <mgebbe@intevation.de>
date Thu, 28 Aug 2014 18:40:39 +0200
parents f27ddfa42e94
children
line wrap: on
line diff
--- a/src/syncALONE.coffee	Tue Jul 29 16:06:05 2014 +0200
+++ b/src/syncALONE.coffee	Thu Aug 28 18:40:39 2014 +0200
@@ -39,9 +39,14 @@
   try
     Usermap.scan ((user) ->
       if user.id.indexOf('@twitter') isnt -1
-        console.log "start sync for twitter user"
-        Twitter.syncToESN(user)
-        Twitter.syncFromESN(user)
+        # do if true or undefined
+        unless user.toesn is false
+          console.log "start sync TOESN for twitter user"
+          Twitter.syncToESN(user)
+        unless user.fromesn is false
+          console.log "start sync FROMESN for twitter user"
+          Twitter.syncFromESN(user)
+          Twitter.postLike(user)
     ), (err) ->
   catch err
     console.log 'Twitter Error!' + err
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)