summaryrefslogtreecommitdiff
path: root/src/contact.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-03-11 17:54:29 +0100
committermathieui <mathieui@mathieui.net>2013-03-11 17:54:29 +0100
commitd2d04162146e6df454d67a4e48ee6655af1d6c0a (patch)
treef0b132de550c62dfe4ac9fb59234ea14ecd1874a /src/contact.py
parent34af8f69c7aff2d02a10fab954ae7ddf15cee193 (diff)
downloadpoezio-d2d04162146e6df454d67a4e48ee6655af1d6c0a.tar.gz
poezio-d2d04162146e6df454d67a4e48ee6655af1d6c0a.tar.bz2
poezio-d2d04162146e6df454d67a4e48ee6655af1d6c0a.tar.xz
poezio-d2d04162146e6df454d67a4e48ee6655af1d6c0a.zip
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 <nick/> at the beginning of a normal chat - not implemented in MUC (wontfix)
Diffstat (limited to 'src/contact.py')
-rw-r--r--src/contact.py8
1 files changed, 7 insertions, 1 deletions
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):