Fixed twitter integration.

This commit is contained in:
Martin Edenhofer 2014-12-01 11:24:07 +01:00
parent 0f5b98221a
commit cceafe906f
2 changed files with 2 additions and 2 deletions

View file

@ -2,7 +2,7 @@
require 'twitter' require 'twitter'
class Channel::Twitter2 class Channel::TWITTER2
def connect(channel) def connect(channel)
@client = Twitter::REST::Client.new do |config| @client = Twitter::REST::Client.new do |config|
config.consumer_key = channel[:options][:consumer_key] config.consumer_key = channel[:options][:consumer_key]

View file

@ -17,7 +17,7 @@ class Observer::Ticket::Article::CommunicateTwitter < ActiveRecord::Observer
type = Ticket::Article::Type.lookup( :id => record.type_id ) type = Ticket::Article::Type.lookup( :id => record.type_id )
return if type['name'] != 'twitter direct-message' && type['name'] != 'twitter status' return if type['name'] != 'twitter direct-message' && type['name'] != 'twitter status'
a = Channel::Twitter2.new a = Channel::TWITTER2.new
message = a.send( message = a.send(
{ {
:type => type['name'], :type => type['name'],