[hack] don't traceback when there's no network connection
This commit is contained in:
parent
89d40971fe
commit
2351ee0458
@ -216,16 +216,20 @@ class Chat(gtk.VBox):
|
||||
def send_sketch(self, svgdata):
|
||||
if not svgdata or not len(svgdata):
|
||||
return
|
||||
if self._stream_writer:
|
||||
self._stream_writer.write(self.serialize_message(svgdata))
|
||||
owner = PresenceService.get_instance().get_owner()
|
||||
if owner:
|
||||
self._insert_sketch(owner, svgdata)
|
||||
|
||||
def send_text_message(self, text):
|
||||
"""Send a chat message and insert it into the local buffer."""
|
||||
if len(text) <= 0:
|
||||
return
|
||||
if self._stream_writer:
|
||||
self._stream_writer.write(self.serialize_message(text))
|
||||
owner = PresenceService.get_instance().get_owner()
|
||||
if owner:
|
||||
self._insert_rich_message(owner, text)
|
||||
|
||||
def serialize_message(self, message):
|
||||
|
Loading…
Reference in New Issue
Block a user