|
1 | 1 | /** |
2 | 2 | @name: aping-plugin-codebird |
3 | | - @version: 0.7.6 (24-01-2016) |
| 3 | + @version: 0.7.7 (24-01-2016) |
4 | 4 | @author: Jonathan Hornung <jonathan.hornung@gmail.com> |
5 | 5 | @url: https://github.com/JohnnyTheTank/apiNG-plugin-codebird |
6 | 6 | @license: MIT |
@@ -251,13 +251,15 @@ angular.module("jtt_aping_codebird") |
251 | 251 | blog_id: _item.user.id_str, |
252 | 252 | blog_link: this.getThisPlattformLink() + _item.user.screen_name + "/", |
253 | 253 | intern_id: _item.id_str, |
254 | | - timestamp: new Date(Date.parse(_item.created_at.replace(/( \+)/, ' UTC$1'))).getTime(), |
| 254 | + timestamp: new Date(Date.parse(_item.created_at.replace(/^\w+ (\w+) (\d+) ([\d:]+) \+0000 (\d+)$/, "$1 $2 $4 $3 UTC"))).getTime(), |
255 | 255 | text: _item.text, |
256 | 256 | shares: _item.retweet_count, |
257 | 257 | likes: _item.favorite_count, |
258 | 258 | }); |
259 | 259 |
|
260 | | - socialObject.date_time = new Date(socialObject.timestamp); |
| 260 | + if(socialObject.timestamp) { |
| 261 | + socialObject.date_time = new Date(socialObject.timestamp); |
| 262 | + } |
261 | 263 |
|
262 | 264 | if (_item.entities && _item.entities.media && _item.entities.media.length > 0) { |
263 | 265 | socialObject.source = _item.entities.media; |
@@ -286,13 +288,15 @@ angular.module("jtt_aping_codebird") |
286 | 288 | blog_id: _item.user.id_str, |
287 | 289 | blog_link: this.getThisPlattformLink() + _item.user.screen_name + "/", |
288 | 290 | intern_id: _item.id_str, |
289 | | - timestamp: new Date(Date.parse(_item.created_at.replace(/( \+)/, ' UTC$1'))).getTime(), |
| 291 | + timestamp: new Date(Date.parse(_item.created_at.replace(/^\w+ (\w+) (\d+) ([\d:]+) \+0000 (\d+)$/, "$1 $2 $4 $3 UTC"))).getTime(), |
290 | 292 | text: _item.text, |
291 | 293 | shares: _item.retweet_count, |
292 | 294 | likes: _item.favorite_count, |
293 | 295 | }); |
294 | 296 |
|
295 | | - imageObject.date_time = new Date(imageObject.timestamp); |
| 297 | + if(imageObject.timestamp) { |
| 298 | + imageObject.date_time = new Date(imageObject.timestamp); |
| 299 | + } |
296 | 300 |
|
297 | 301 | if (_item.entities && _item.entities.media && _item.entities.media.length > 0) { |
298 | 302 |
|
|
0 commit comments