Skip to content

Commit

Permalink
Retrieve optional `user-name' from XML for StatusNet correctly.
Browse files Browse the repository at this point in the history
Thanks to Takashi Masuda.

* twittering-mode.el (twittering-atom-xmltree-to-status-datum):
retrieve `user-screen-name' and optional `user-name' from XML for
StatusNet correctly. Thanks to Takashi Masuda.
  • Loading branch information
cvmat committed Aug 21, 2010
1 parent d52b79a commit ee4604a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
2010-08-22 Tadashi MATSUO <tad@mymail.twin.jp>

* twittering-mode.el (twittering-atom-xmltree-to-status-datum):
retrieve `user-screen-name' and optional `user-name' from XML for
StatusNet correctly. Thanks to Takashi Masuda.

2010-08-21 Tadashi MATSUO <tad@mymail.twin.jp>

* twittering-mode.el: Restore `twittering-get-{search,status}-url'.
Expand Down
7 changes: 4 additions & 3 deletions twittering-mode.el
Expand Up @@ -4698,10 +4698,11 @@ BUFFER may be a buffer or the name of an existing buffer."
(text . ,(twittering-decode-html-entities
(car (cddr (assq 'title atom-xml-entry)))))
,@(cond
((eq twittering-service-method 'statusnet)
((and (eq twittering-service-method 'statusnet)
(string-match "^\\([^ ]+\\)\\( (\\(.*\\))\\)?$" author-str))
;; StatusNet
`((user-screen-name . ,author-str)
(user-name . "")))
`((user-screen-name . ,(match-string 1 author-str))
(user-name . ,(or (match-string 3 author-str) ""))))
((string-match "^\\([^ ]+\\) (\\(.*\\))$" author-str)
;; Twitter (default)
`((user-screen-name . ,(match-string 1 author-str))
Expand Down

0 comments on commit ee4604a

Please sign in to comment.