comparison src/twitter.coffee @ 8:6fd0a307850f

check empty strings and users
author Mathias Gebbe <mgebbe@intevation.de>
date Wed, 11 Jun 2014 21:58:41 +0200
parents 2123f355ab68
children a52b5b244e51
comparison
equal deleted inserted replaced
7:2123f355ab68 8:6fd0a307850f
106 # GET PUBLIC PUMP POSTS AND POST THEM 106 # GET PUBLIC PUMP POSTS AND POST THEM
107 async.waterfall [ 107 async.waterfall [
108 (callback) -> 108 (callback) ->
109 Usermap.search {id: me + '_to_' + me}, callback 109 Usermap.search {id: me + '_to_' + me}, callback
110 (user, callback) -> 110 (user, callback) ->
111 Pump.getUserFeed(user[0],callback) 111 if (user[0]?)
112 Pump.getUserFeed(user[0],callback)
113 else
114 return
112 (feed, callback) -> 115 (feed, callback) ->
113 ti = new Date().getTime() - interval 116 ti = new Date().getTime() - interval
114 async.eachSeries feed.items, ((post, callback) -> 117 async.eachSeries feed.items, ((post, callback) ->
115 # do for each post 118 # do for each post
116 ts = Date.parse(post.updated) 119 ts = Date.parse(post.updated)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)