conditional reply_prefix for replies
Reply prefix is now only added if the recipient's screen_name isn't already in the tweet text.
This commit is contained in:
parent
0a915b0a30
commit
e6cefa0890
1 changed files with 2 additions and 1 deletions
|
@ -379,7 +379,8 @@ module Ebooks
|
|||
end
|
||||
|
||||
log "Replying to @#{ev.user.screen_name} with: #{meta.reply_prefix + text}"
|
||||
tweet = twitter.update(meta.reply_prefix + text, opts.merge({in_reply_to_status_id: ev.id}))
|
||||
text = meta.reply_prefix + text unless text.match /@#{Regexp.escape ev.user.screen_name}/i
|
||||
tweet = twitter.update(text, opts.merge(in_reply_to_status_id: ev.id))
|
||||
conversation(tweet).add(tweet)
|
||||
tweet
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue