Method: SlackPoster#post_status

Defined in:
lib/slack_twitter_egosa/slack_poster.rb

#post_status(status) ⇒ Object


12
13
14
15
16
17
18
19
20
21
# File 'lib/slack_twitter_egosa/slack_poster.rb', line 12

def post_status(status)
  @locker.synchronize do
    unless pushed?(status.id)
      @poster.icon_url = status.user.profile_image_url
      @poster.username = "#{status.user.name}(@#{status.user.screen_name})"
      @poster.send_message("#{status.attrs[:full_text]}\n#{status.url}")
      push(status.id)
    end
  end
end