Get presence to work on the chat window
This commit is contained in:
parent
0947581a11
commit
5f628f1a4f
@ -34,8 +34,7 @@ class ActivityChat(GroupChat):
|
||||
addr = service.get_address()
|
||||
port = service.get_port()
|
||||
self._chat_service = self._pservice.share_activity(self._activity,
|
||||
stype=ActivityChat.SERVICE_TYPE, properties=None,
|
||||
address=addr, port=port)
|
||||
stype=ActivityChat.SERVICE_TYPE, address=addr, port=port)
|
||||
self._setup_stream(self._chat_service)
|
||||
|
||||
def share(self):
|
||||
|
@ -209,7 +209,7 @@ class Chat(gtk.VBox):
|
||||
def recv_message(self, message):
|
||||
"""Insert a remote chat message into the chat buffer."""
|
||||
[nick, msg] = Chat.deserialize_message(message)
|
||||
buddy = self._pservice.get_buddy_by_nick_name(nick)
|
||||
buddy = self._pservice.get_buddy_by_name(nick)
|
||||
if not buddy:
|
||||
logging.error('The buddy %s is not present.' % (nick))
|
||||
return
|
||||
|
@ -13,7 +13,7 @@ class GroupChat(Chat):
|
||||
def _setup_stream(self, service):
|
||||
self._group_stream = Stream.new_from_service(service)
|
||||
self._group_stream.set_data_listener(self._group_recv_message)
|
||||
self._stream_writer = self._group_stream.new_writer()
|
||||
self._stream_writer = self._group_stream.new_writer(service)
|
||||
|
||||
def _group_recv_message(self, address, msg):
|
||||
logging.debug('Group chat received from %s message %s' % (address, msg))
|
||||
|
Loading…
Reference in New Issue
Block a user