implement chatoob messages command

This commit is contained in:
Christophe Benz 2010-05-16 17:42:27 +02:00
commit a4a74eda4f
4 changed files with 40 additions and 5 deletions

View file

@ -48,6 +48,11 @@ class Chatoob(ConsoleApplication):
for backend, contact in self.weboob.do('iter_chat_contacts', online=True, offline=False):
self.format(contact)
@ConsoleApplication.command('get messages')
def command_messages(self):
for backend, message in self.weboob.do('iter_chat_messages'):
self.format(message)
@ConsoleApplication.command('send message to contact')
def command_send(self, _id, message):
for backend, result in self.weboob.do('send_chat_message', _id, message):