comparison src/server/server.py @ 520:d58d4dd0cefe

browser and server sides: add bridge method getLastResource
author souliane <souliane@mailoo.org>
date Tue, 02 Sep 2014 21:21:21 +0200
parents 530c88c1deee
children 69bffcf37ce3
comparison
equal deleted inserted replaced
519:138336986bd0 520:d58d4dd0cefe
549 @param syntax_to: dest syntax (e.g.: "XHTML") 549 @param syntax_to: dest syntax (e.g.: "XHTML")
550 @param safe: clean resulting XHTML to avoid malicious code if True (forced here) 550 @param safe: clean resulting XHTML to avoid malicious code if True (forced here)
551 @return: converted text """ 551 @return: converted text """
552 profile = ISATSession(self.session).profile 552 profile = ISATSession(self.session).profile
553 return self.sat_host.bridge.syntaxConvert(text, syntax_from, syntax_to, True, profile) 553 return self.sat_host.bridge.syntaxConvert(text, syntax_from, syntax_to, True, profile)
554
555 def jsonrpc_getLastResource(self, jid_s):
556 """Tell the backend to leave us OTR handling"""
557 profile = ISATSession(self.session).profile
558 return self.sat_host.bridge.getLastResource(jid_s, profile)
554 559
555 560
556 class Register(JSONRPCMethodManager): 561 class Register(JSONRPCMethodManager):
557 """This class manage the registration procedure with SàT 562 """This class manage the registration procedure with SàT
558 It provide an api for the browser, check password and setup the web server""" 563 It provide an api for the browser, check password and setup the web server"""