safubot 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -197,16 +197,17 @@ module Safubot
197
197
  # @param status A raw JSON-derived tweet.
198
198
  def handle_tweet(status)
199
199
  return if status.user.screen_name == @username
200
- if status.text.match(/@#{@username}/i)
201
- handle_request(Tweet.from(status).make_request)
200
+ tweet = Tweet.from(status)
201
+ if tweet.text.match(/@#{@username}/i) && !tweet.original_tweet
202
+ handle_request(tweet.make_request)
202
203
  else
203
- emit(:timeline, Tweet.from(status))
204
+ emit(:timeline, tweet)
204
205
  end
205
206
  end
206
207
 
207
208
  # Constructs the appropriate series of mentions for a reply to this tweet.
208
209
  def reply_header(tweet)
209
- (["@#{tweet.username}"] + (tweet.header_mentions - ["@#{@username}"])).join
210
+ (["@#{tweet.username}"] + (tweet.header_mentions - ["@#{@username}"])).join(' ')
210
211
  end
211
212
 
212
213
  # Replies to a tweet using the appropriate mentions.
@@ -1,3 +1,3 @@
1
1
  module Safubot
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: safubot
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.6
5
+ version: 0.0.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jaiden Mispy
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-12-01 00:00:00 Z
13
+ date: 2011-12-02 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport