Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

Commit

Permalink
Merge 4231812 into 461cae4
Browse files Browse the repository at this point in the history
  • Loading branch information
mazgi committed Sep 5, 2018
2 parents 461cae4 + 4231812 commit bd7fd51
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .ruby-version
@@ -0,0 +1 @@
2.4.0
6 changes: 6 additions & 0 deletions examples/rtm.rb
Expand Up @@ -4,6 +4,12 @@
token = ENV["TOKEN"] || (print "Token: "; gets.strip)
client = Slack::Client.new token: token

#rtm = client.realtime
client.realtime.on :message do |m|
p m
end
client.realtime.start

rtm = client.realtime
rtm.on :message do |m|
p m
Expand Down
2 changes: 1 addition & 1 deletion lib/slack/api.rb
Expand Up @@ -23,7 +23,7 @@ def initialize(options={})
include Endpoint

def realtime
RealTime::Client.new(post("rtm.start"))
@realtime ||= RealTime::Client.new(post("rtm.start"))
end
end
end

0 comments on commit bd7fd51

Please sign in to comment.