mirror of
https://github.com/thewesker/twitter_ebooks.git
synced 2025-12-20 12:21:11 -05:00
2.2.3 - Avoid some mention edge cases
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# twitter\_ebooks 2.2.2
|
# twitter\_ebooks 2.2.3
|
||||||
|
|
||||||
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.
|
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,8 @@ module Ebooks
|
|||||||
mless = ev[:text]
|
mless = ev[:text]
|
||||||
begin
|
begin
|
||||||
ev.attrs[:entities][:user_mentions].reverse.each do |entity|
|
ev.attrs[:entities][:user_mentions].reverse.each do |entity|
|
||||||
mless = mless[0...entity[:indices][0]] + mless[entity[:indices][1]..-1].strip
|
last = mless[entity[:indices][1]..-1]||''
|
||||||
|
mless = mless[0...entity[:indices][0]] + last.strip
|
||||||
end
|
end
|
||||||
rescue Exception
|
rescue Exception
|
||||||
p ev.attrs[:entities][:user_mentions]
|
p ev.attrs[:entities][:user_mentions]
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
module Ebooks
|
module Ebooks
|
||||||
VERSION = "2.2.2"
|
VERSION = "2.2.3"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user