Mercurial > libervia-web
comparison libervia.tac @ 133:4ad621df9e34
browser side: group blog is now used to send all microblogs
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 04 Apr 2012 00:07:17 +0200 |
parents | 30d8e328559b |
children | ceef355156de |
comparison
equal
deleted
inserted
replaced
132:30d8e328559b | 133:4ad621df9e34 |
---|---|
194 profile = ISATSession(self.session).profile | 194 profile = ISATSession(self.session).profile |
195 match = re.match(r'@(.+?): *(.*$)', raw_text) | 195 match = re.match(r'@(.+?): *(.*$)', raw_text) |
196 if match: | 196 if match: |
197 recip = match.group(1) | 197 recip = match.group(1) |
198 text = match.group(2) | 198 text = match.group(2) |
199 #if recip == '@' and text: | |
200 # #This text if for the public microblog | |
201 # return self.sat_host.bridge.sendPersonalEvent("MICROBLOG", {'content':text}, profile) | |
199 if recip == '@' and text: | 202 if recip == '@' and text: |
200 #This text if for the public microblog | 203 #This text if for the public microblog |
201 return self.sat_host.bridge.sendPersonalEvent("MICROBLOG", {'content':text}, profile) | 204 print "sending public blog" |
205 return self.sat_host.bridge.sendGroupBlog("PUBLIC", [], text, profile) | |
202 else: | 206 else: |
203 return self.sat_host.bridge.sendGroupBlog([recip], text, profile) | 207 print "sending group blog" |
208 return self.sat_host.bridge.sendGroupBlog("GROUP", [recip], text, profile) | |
204 | 209 |
205 def jsonrpc_getLastMblogs(self, publisher_jid, max_item): | 210 def jsonrpc_getLastMblogs(self, publisher_jid, max_item): |
206 """Get last microblogs posted by a contact | 211 """Get last microblogs posted by a contact |
207 @param publisher_jid: jid of the publisher | 212 @param publisher_jid: jid of the publisher |
208 @param max_item: number of items to ask | 213 @param max_item: number of items to ask |