Beispiel #1
0
 def on_msg(self, data):
     timestamp = data.get('time') or time.time()
     message = msg.MSG(data.get('data', ''), timestamp, data.get('username', ''))
     message.display()
     self.chat_deck.appendleft(message)
 def on_msg(self, data):
     msg.MSG(data.get('data'), data['time'], data['username']).display()
 def chat(self, username, timestamp, message, self_msg=False):
     envelope = msg.MSG(message, timestamp, username)
     if not self_msg:
         self.chat_deck.appendleft(envelope)
     envelope.display()