examples/conference/application.rb in connfu-client-0.1 vs examples/conference/application.rb in connfu-client-0.1.1
- old
+ new
@@ -21,11 +21,11 @@
Connfu.logger = STDOUT
Connfu.log_level = Logger::DEBUG
-@connfu = Connfu.application(token, "http://localhost:3000/v1") {
+@connfu = Connfu.application(token) {
listen(:voice) do |conference|
conference.on(:join) do |call|
puts "New inbound call from #{call[:from]} on number #{call[:to]}"
conf = ConferenceApp::find_by_conference_number(call[:destination])
@@ -53,9 +53,15 @@
twitter.on(:new) do |tweet|
puts "#{tweet[:from]} just posted a new tweet with content #{tweet.content} in the conference room: #{tweet[:channel_name]}"
conf = ConferenceApp::find_by_twitter_user(tweet[:to])
conf.wall.print("#{tweet[:from]} has tweeted => #{tweet[:content]}")
+ end
+ end
+
+ listen(:rss) do |rss|
+ rss.on(:new) do |post|
+ puts "New post with title #{post[:content]} in the channel #{post[:channel_name]}"
end
end
listen(:sms) do |sms|
sms.on(:new) do |message|