Fixed bug: Missing 'in_reply_to' attribute in case of status replies.
This commit is contained in:
parent
f9a13f2160
commit
4df77067cc
1 changed files with 14 additions and 8 deletions
|
@ -141,12 +141,18 @@ class Tweet
|
||||||
article_type = 'twitter direct-message'
|
article_type = 'twitter direct-message'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
in_reply_to = nil
|
||||||
|
if tweet.respond_to?('in_reply_to_status_id') && tweet.in_reply_to_status_id && tweet.in_reply_to_status_id.to_s != ''
|
||||||
|
in_reply_to = tweet.in_reply_to_status_id
|
||||||
|
end
|
||||||
|
|
||||||
Ticket::Article.create(
|
Ticket::Article.create(
|
||||||
from: user.login,
|
from: user.login,
|
||||||
to: to,
|
to: to,
|
||||||
body: tweet.text,
|
body: tweet.text,
|
||||||
message_id: tweet.id,
|
message_id: tweet.id,
|
||||||
ticket_id: ticket.id,
|
ticket_id: ticket.id,
|
||||||
|
in_reply_to: in_reply_to,
|
||||||
type: Ticket::Article::Type.find_by( name: article_type ),
|
type: Ticket::Article::Type.find_by( name: article_type ),
|
||||||
sender: Ticket::Article::Sender.find_by( name: 'Customer' ),
|
sender: Ticket::Article::Sender.find_by( name: 'Customer' ),
|
||||||
internal: false,
|
internal: false,
|
||||||
|
|
Loading…
Reference in a new issue