basetabs: return a copy of ChatTab.jid to prevent nasty (mutability) side-effects
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
7587b954e3
commit
8ee9abdd69
1 changed files with 2 additions and 1 deletions
|
@ -13,6 +13,7 @@ This module also defines ChatTabs, the parent class for all tabs
|
|||
revolving around chats.
|
||||
"""
|
||||
|
||||
import copy
|
||||
import logging
|
||||
import string
|
||||
import asyncio
|
||||
|
@ -538,7 +539,7 @@ class ChatTab(Tab):
|
|||
|
||||
@property
|
||||
def jid(self) -> JID:
|
||||
return self._jid
|
||||
return copy.copy(self._jid)
|
||||
|
||||
@jid.setter
|
||||
def jid(self, value: JID) -> None:
|
||||
|
|
Loading…
Reference in a new issue