basetabs: return a copy of ChatTab.jid to prevent nasty (mutability) side-effects

Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <pep@bouah.net>
parent 7587b954
...@@ -13,6 +13,7 @@ This module also defines ChatTabs, the parent class for all tabs ...@@ -13,6 +13,7 @@ This module also defines ChatTabs, the parent class for all tabs
revolving around chats. revolving around chats.
""" """
import copy
import logging import logging
import string import string
import asyncio import asyncio
...@@ -538,7 +539,7 @@ class ChatTab(Tab): ...@@ -538,7 +539,7 @@ class ChatTab(Tab):
@property @property
def jid(self) -> JID: def jid(self) -> JID:
return self._jid return copy.copy(self._jid)
@jid.setter @jid.setter
def jid(self, value: JID) -> None: def jid(self, value: JID) -> None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment