Added exception for unkonwn twitter article type.
This commit is contained in:
parent
44593cd800
commit
0703c53732
1 changed files with 2 additions and 2 deletions
|
@ -195,7 +195,6 @@ class Tweet
|
||||||
|
|
||||||
def from_article(article)
|
def from_article(article)
|
||||||
|
|
||||||
|
|
||||||
tweet = nil
|
tweet = nil
|
||||||
if article[:type] == 'twitter direct-message'
|
if article[:type] == 'twitter direct-message'
|
||||||
|
|
||||||
|
@ -206,7 +205,6 @@ class Tweet
|
||||||
article[:body],
|
article[:body],
|
||||||
{}
|
{}
|
||||||
)
|
)
|
||||||
|
|
||||||
elsif article[:type] == 'twitter status'
|
elsif article[:type] == 'twitter status'
|
||||||
|
|
||||||
Rails.logger.debug "Create tweet from article..."
|
Rails.logger.debug "Create tweet from article..."
|
||||||
|
@ -217,6 +215,8 @@ class Tweet
|
||||||
in_reply_to_status_id: article[:in_reply_to]
|
in_reply_to_status_id: article[:in_reply_to]
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
else
|
||||||
|
fail "Can't handle unknown twitter article type 'article[:type]'."
|
||||||
end
|
end
|
||||||
|
|
||||||
Rails.logger.debug tweet.inspect
|
Rails.logger.debug tweet.inspect
|
||||||
|
|
Loading…
Reference in a new issue