diff options
author | mathieui <mathieui@mathieui.net> | 2013-03-11 17:54:29 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2013-03-11 17:54:29 +0100 |
commit | d2d04162146e6df454d67a4e48ee6655af1d6c0a (patch) | |
tree | f0b132de550c62dfe4ac9fb59234ea14ecd1874a /src/contact.py | |
parent | 34af8f69c7aff2d02a10fab954ae7ddf15cee193 (diff) | |
download | poezio-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.py | 8 |
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): |