Ejemplo n.º 1
0
def log_dummy():
    if hasattr(app, 'q_messages') and app.q_messages:
        app.q_messages.put({
            'message': "?DUMMY:--WARNING",
            'buddy': "not-available",
            'received': True,
        })
    store("?DUMMY:--WARNING", buddy="not-available", received=True)
Ejemplo n.º 2
0
    def writing_im_msg(self, account, sender, message, conversation, flags):
        print('writing_im_msg', account, sender, message, conversation, flags)
        if '/' in sender:
            buddy, buddy_device = sender.split('/')
        else:
            buddy, buddy_device = sender, None

        self.q_messages.put({
            'message': message,
            'buddy': buddy,
            'received': (flags == 1),
            })

        if flags == 1:
            print('You sent', message)
            store(message, buddy=buddy, received=False)
        else:
            print('You received', message, 'from', sender)
            store(message, buddy=buddy, received=True)