Project

General

Profile

« Previous | Next » 

Revision 8f6f45f7

Added by Marc Dequènes over 13 years ago

  • ID 8f6f45f7b7fcaba40dd0a82c67e1e0ad7cde4dd7

[evol] move notification from Protocol to Conversation

View differences:

lib/cyborghood/cyborg/protocol.rb
VERSION = "0.1"
CAPABILITIES = []
attr_reader :system_notification, :user_notification
@@request_callback = proc do |result|
protocol = result[:reply_message].conv_thread.conversation.protocol
protocol.process_request_result(result)
......
@negociation_ok = false
@action_followup = {}
@system_notification = EventMachine::Channel.new
@user_notification = EventMachine::Channel.new
end
def negociation_ok?
......
end
def receive_notify_event(message)
@user_notification << {
@conversation.user_notification << {
:from => message.conversation.peer_id,
:topic => message.action_parameters[:name],
:info => message.action_parameters[:info]
......
def check_thread_idle(conv_thread)
return if @action_followup.has_key? conv_thread.id
@system_notification << { :topic => 'THREAD IDLE', :thread => conv_thread.name }
@conversation.system_notification << { :topic => 'THREAD IDLE', :thread => conv_thread.name }
end
end
end

Also available in: Unified diff