comparison libervia.tac @ 261:3df0c3634c29

browser side: management of extra data for sendMblogComment, allowing to send rich text for comments
author Goffi <goffi@goffi.org>
date Fri, 15 Nov 2013 15:34:57 +0100
parents a20815c75c15
children cc778206b7ae
comparison
equal deleted inserted replaced
260:533d68585866 261:3df0c3634c29
246 print "sending group blog" 246 print "sending group blog"
247 return self.sat_host.bridge.sendGroupBlog("GROUP", [dest], text, extra, profile) 247 return self.sat_host.bridge.sendGroupBlog("GROUP", [dest], text, extra, profile)
248 else: 248 else:
249 raise Exception("Invalid data") 249 raise Exception("Invalid data")
250 250
251 def jsonrpc_sendMblogComment(self, node, text): 251 def jsonrpc_sendMblogComment(self, node, text, extra={}):
252 """ Send microblog message 252 """ Send microblog message
253 @param node: url of the comments node 253 @param node: url of the comments node
254 @param text: comment 254 @param text: comment
255 """ 255 """
256 profile = ISATSession(self.session).profile 256 profile = ISATSession(self.session).profile
257 if node and text: 257 if node and text:
258 return self.sat_host.bridge.sendGroupBlogComment(node, text, profile) 258 return self.sat_host.bridge.sendGroupBlogComment(node, text, extra, profile)
259 else: 259 else:
260 raise Exception("Invalid data") 260 raise Exception("Invalid data")
261 261
262 def jsonrpc_getLastMblogs(self, publisher_jid, max_item): 262 def jsonrpc_getLastMblogs(self, publisher_jid, max_item):
263 """Get last microblogs posted by a contact 263 """Get last microblogs posted by a contact