diff --git a/gajim/common/contacts.py b/gajim/common/contacts.py index e3b2c4c31..8693c94a8 100644 --- a/gajim/common/contacts.py +++ b/gajim/common/contacts.py @@ -65,6 +65,16 @@ class CommonContact(XMPPEntity): # this is contact's chatstate self.chatstate = chatstate + @property + def show(self): + return self._show + + @show.setter + def show(self, value): + if not isinstance(value, str): + raise TypeError('show must be a string') + self._show = value + def get_full_jid(self): raise NotImplementedError diff --git a/gajim/common/helpers.py b/gajim/common/helpers.py index c2457745e..da97c736b 100644 --- a/gajim/common/helpers.py +++ b/gajim/common/helpers.py @@ -420,7 +420,7 @@ def get_css_show_color(show): return None elif show in ('xa', 'dnd'): return 'status-dnd' - elif show in ('away'): + elif show == 'away': return 'status-away' def get_uf_sub(sub):