Removed debugging messages.
This commit is contained in:
parent
e1505a914a
commit
73f6b8d54c
1 changed files with 8 additions and 6 deletions
|
@ -213,9 +213,11 @@ class Channel::Twitter2
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def send(atts, channel)
|
def send(attr, notification = false)
|
||||||
# logger.debug('tweeeeettttt!!!!!!')
|
# logger.debug('tweeeeettttt!!!!!!')
|
||||||
@client = Twitter::Client.new(
|
channel = Channel.where( :area => 'Twitter::Inbound', :active => true ).first
|
||||||
|
|
||||||
|
client = Twitter::Client.new(
|
||||||
:consumer_key => channel[:options][:consumer_key],
|
:consumer_key => channel[:options][:consumer_key],
|
||||||
:consumer_secret => channel[:options][:consumer_secret],
|
:consumer_secret => channel[:options][:consumer_secret],
|
||||||
:oauth_token => channel[:options][:oauth_token],
|
:oauth_token => channel[:options][:oauth_token],
|
||||||
|
@ -223,23 +225,23 @@ class Channel::Twitter2
|
||||||
)
|
)
|
||||||
puts 'to:' + atts[:to].to_s
|
puts 'to:' + atts[:to].to_s
|
||||||
if atts[:type] == 'twitter direct-message' then
|
if atts[:type] == 'twitter direct-message' then
|
||||||
dm = @client.direct_message_create(
|
dm = client.direct_message_create(
|
||||||
atts[:to].to_s,
|
atts[:to].to_s,
|
||||||
atts[:body].to_s,
|
atts[:body].to_s,
|
||||||
options = {}
|
options = {}
|
||||||
)
|
)
|
||||||
puts dm.inspect
|
# puts dm.inspect
|
||||||
return dm
|
return dm
|
||||||
end
|
end
|
||||||
|
|
||||||
if atts[:type] == 'twitter status' then
|
if atts[:type] == 'twitter status' then
|
||||||
message = @client.update(
|
message = client.update(
|
||||||
atts[:body].to_s,
|
atts[:body].to_s,
|
||||||
options = {
|
options = {
|
||||||
:in_reply_to_status_id => atts[:in_reply_to]
|
:in_reply_to_status_id => atts[:in_reply_to]
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
puts message.inspect
|
# puts message.inspect
|
||||||
return message
|
return message
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue