Permalink
Browse files

Fix the function parsing timelines related to direct messages.

* twittering-mode.el: Fix the function parsing timelines related
to direct messages with the Twitter REST API v1.1.
(twittering-http-get-default-sentinel): call the function
`twittering-json-object-to-a-status-on-direct-messages' correctly
when using the Twitter REST API v1.1.
  • Loading branch information...
1 parent 45dee6f commit 8c43a687d4974a6b23d835a482d727917f10b6de @cvmat cvmat committed Mar 4, 2013
Showing with 14 additions and 12 deletions.
  1. +6 −0 ChangeLog
  2. +8 −12 twittering-mode.el
View
@@ -4,6 +4,12 @@
(twittering-call-api-with-account-in-api1.1): correctly bind the
variable `spec-string' used.
+ * twittering-mode.el: Fix the function parsing timelines related
+ to direct messages with the Twitter REST API v1.1.
+ (twittering-http-get-default-sentinel): call the function
+ `twittering-json-object-to-a-status-on-direct-messages' correctly
+ when using the Twitter REST API v1.1.
+
2013-03-04 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Use the JSON format for retrieving list
View
@@ -2448,22 +2448,18 @@ FORMAT is a response data format (\"xml\", \"atom\", \"json\")"
(cond
((null json-array)
nil)
- ((memq service-method '(twitter statusnet))
+ ((eq (car spec) 'search)
(cond
- ((eq (car spec) 'search)
+ ((memq service-method '(twitter statusnet))
(mapcar 'twittering-json-object-to-a-status-on-search
(cdr (assq 'results json-array))))
- ((twittering-timeline-spec-is-direct-messages-p spec)
- (mapcar
- 'twittering-json-object-to-a-status-on-direct-messages
- json-array))
- (t
+ ((eq service-method 'twitter-api-v1.1)
(mapcar 'twittering-json-object-to-a-status
- json-array))))
- ((and (eq service-method 'twitter-api-v1.1)
- (eq (car spec) 'search))
- (mapcar 'twittering-json-object-to-a-status
- (cdr (assq 'statuses json-array))))
+ (cdr (assq 'statuses json-array))))))
+ ((twittering-timeline-spec-is-direct-messages-p spec)
+ (mapcar
+ 'twittering-json-object-to-a-status-on-direct-messages
+ json-array))
(t
(mapcar 'twittering-json-object-to-a-status
json-array)))))

0 comments on commit 8c43a68

Please sign in to comment.