Mercurial > libervia-backend
comparison src/memory/memory.py @ 512:862c0d6ab974
core, bridge, quick_frontend: MUC private messages history management:
- history now store message type
- sqlite3 storage: fixed resource management in getHistory
- bridge: added message type in getHistory return value
- quick_chats: (ugly) hacks to manage private history filtering/nickname printing
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 17 Oct 2012 00:35:48 +0200 |
parents | f98bef71a918 |
children | 2c4016921403 |
comparison
equal
deleted
inserted
replaced
511:62f7f2403093 | 512:862c0d6ab974 |
---|---|
608 def deleteProfile(self, name): | 608 def deleteProfile(self, name): |
609 """Delete an existing profile | 609 """Delete an existing profile |
610 @param name: Name of the profile""" | 610 @param name: Name of the profile""" |
611 return self.params.deleteProfile(name) | 611 return self.params.deleteProfile(name) |
612 | 612 |
613 def addToHistory(self, from_jid, to_jid, message, timestamp=None, profile="@NONE@"): | 613 def addToHistory(self, from_jid, to_jid, message, _type='chat', timestamp=None, profile="@NONE@"): |
614 assert(profile!="@NONE@") | 614 assert(profile!="@NONE@") |
615 return self.storage.addToHistory(from_jid, to_jid, message, timestamp, profile) | 615 return self.storage.addToHistory(from_jid, to_jid, message, _type, timestamp, profile) |
616 | 616 |
617 def getHistory(self, from_jid, to_jid, limit=0, between=True): | 617 def getHistory(self, from_jid, to_jid, limit=0, between=True): |
618 return self.storage.getHistory(jid.JID(from_jid), jid.JID(to_jid), limit, between) | 618 return self.storage.getHistory(jid.JID(from_jid), jid.JID(to_jid), limit, between) |
619 | 619 |
620 def addServerFeature(self, feature, profile): | 620 def addServerFeature(self, feature, profile): |