mirror of
https://github.com/thewesker/twitter_ebooks.git
synced 2025-12-20 04:11:08 -05:00
2.2.1 - Handle mentions at end of string
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user