From 649aa1ed55e3a0120c58fc4a47a3009aabd14b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ana=C3=ABl=20Verrier?= Date: Mon, 13 Jul 2009 05:07:38 +0200 Subject: [PATCH] * second draft of ArchivingPreferences --- src/common/message_archiving.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/common/message_archiving.py b/src/common/message_archiving.py index ffde9eee3..b11b7e779 100644 --- a/src/common/message_archiving.py +++ b/src/common/message_archiving.py @@ -21,22 +21,21 @@ class ArchivingPreferences: def __init__(self): - self.auto = None + self.auto_save = None self.method_auto = None self.method_local = None self.method_manual = None self.default = None self.items = {} - def set(self, auto, method_auto, method_local, method_manual, default): - self.auto = auto + def set(self, auto_save, method_auto, method_local, method_manual): + self.auto_save = auto_save self.method_auto = method_auto self.method_local = method_local self.method_manual = method_manual - self.default = default - def set_default(self, expire, otr, save): - self.default = {'expire': expire, 'otr': otr, 'save': save} + def set_default(self, otr, save, expire=None, unset=False): + self.default = {'expire': expire, 'otr': otr, 'save': save, 'unset': unset} def append_or_update_item(self, jid, expire, otr, save): self.items[jid] = {'expire': expire, 'otr': otr, 'save': save}