From d2d04162146e6df454d67a4e48ee6655af1d6c0a Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 11 Mar 2013 17:54:29 +0100 Subject: Fix #1841 (User nickname) - add a use_pep_nick boolean option - use it as a nickname for roster contacts, but it does not supercede the user-defined handle - send a at the beginning of a normal chat - not implemented in MUC (wontfix) --- src/contact.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/contact.py') diff --git a/src/contact.py b/src/contact.py index 27a0c701..46cf8e6f 100644 --- a/src/contact.py +++ b/src/contact.py @@ -65,6 +65,7 @@ class Contact(object): """ self.__item = item self.folded_states = defaultdict(lambda: True) + self._name = '' self.error = None self.tune = {} @@ -81,7 +82,12 @@ class Contact(object): @property def name(self): """The name of the contact or an empty string.""" - return self.__item['name'] or '' + return self.__item['name'] or self._name or '' + + @name.setter + def name(self, value): + """Set the name of the contact with user nickname""" + self._name = value @property def ask(self): -- cgit v1.2.3