2.2.1 - Handle mentions at end of string
This commit is contained in:
parent
95a075899a
commit
d676eaa77f
3 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
# twitter\_ebooks 2.2.0
|
||||
# twitter\_ebooks 2.2.1
|
||||
|
||||
Rewrite of my twitter\_ebooks code. While the original was solely a tweeting Markov generator, this framework helps you build any kind of interactive twitterbot which responds to mentions/DMs.
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ module Ebooks
|
|||
mless = ev[:text]
|
||||
begin
|
||||
ev.attrs[:entities][:user_mentions].reverse.each do |entity|
|
||||
mless = mless[0...entity[:indices][0]] + mless[entity[:indices][1]+1..-1]
|
||||
mless = mless[0...entity[:indices][0]] + mless[entity[:indices][1]..-1].strip
|
||||
end
|
||||
rescue Exception
|
||||
p ev.attrs[:entities][:user_mentions]
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module Ebooks
|
||||
VERSION = "2.2.0"
|
||||
VERSION = "2.2.1"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue