2.2.1 - Handle mentions at end of string

This commit is contained in:
Mispy 2014-04-20 06:17:48 -07:00
parent 95a075899a
commit d676eaa77f
3 changed files with 3 additions and 3 deletions

View file

@ -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.

View file

@ -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]

View file

@ -1,3 +1,3 @@
module Ebooks
VERSION = "2.2.0"
VERSION = "2.2.1"
end