# HG changeset patch # User Goffi # Date 1387240617 -3600 # Node ID 19bcd39c77f63c692096aa771307d51c079b0cb3 # Parent 92d76ab671568ee2516fd39340dde361b4e53dea server side: sendMessage is now async diff -r 92d76ab67156 -r 19bcd39c77f6 libervia.tac --- a/libervia.tac Tue Dec 17 01:35:59 2013 +0100 +++ b/libervia.tac Tue Dec 17 01:36:57 2013 +0100 @@ -229,22 +229,22 @@ self.sat_host.bridge.setPresence('', presence, 0, {'': status}, profile) - def jsonrpc_sendMessage(self, to_jid, msg, subject, _type, options={}): + def jsonrpc_sendMessage(self, to_jid, msg, subject, type_, options={}): """send message""" profile = ISATSession(self.session).profile - return self.sat_host.bridge.sendMessage(to_jid, msg, subject, _type, options, profile) + return self.asyncBridgeCall("sendMessage", to_jid, msg, subject, type_, options, profile) - def jsonrpc_sendMblog(self, _type, dest, text, extra={}): + def jsonrpc_sendMblog(self, type_, dest, text, extra={}): """ Send microblog message - @param _type: one of "PUBLIC", "GROUP" + @param type_: one of "PUBLIC", "GROUP" @param dest: destinees (list of groups, ignored for "PUBLIC") @param text: microblog's text """ profile = ISATSession(self.session).profile extra['allow_comments'] = 'True' - if _type in ("PUBLIC", "GROUP") and text: - if _type == "PUBLIC": + if type_ in ("PUBLIC", "GROUP") and text: + if type_ == "PUBLIC": #This text if for the public microblog print "sending public blog" return self.sat_host.bridge.sendGroupBlog("PUBLIC", [], text, extra, profile)