status-message
This commit is contained in:
parent
9f32dc3f8a
commit
65d593cd20
@ -82,5 +82,6 @@ so you can have Tox, IRC and XMPP in the same application!
|
|||||||
Work on Tox on this project is suspended until the
|
Work on Tox on this project is suspended until the
|
||||||
[MultiDevice](https://git.plastiras.org/emdee/tox_profile/wiki/MultiDevice-Announcements-POC) problem is solved. Fork me!
|
[MultiDevice](https://git.plastiras.org/emdee/tox_profile/wiki/MultiDevice-Announcements-POC) problem is solved. Fork me!
|
||||||
|
|
||||||
Work on Tox on this project is stopped because Qt5 is EOL.
|
This will probably be ported to Qt6 using qtpy
|
||||||
https://linuxreviews.org/KDE_Is_Now_Offering_A_Qt_5.15_LTS_Branch_Patch-set_For_The_Free_Software_Community
|
https://github.com/spyder-ide/qtpy .
|
||||||
|
|
||||||
|
@ -84,13 +84,15 @@ class GroupChat(contact.Contact, ToxSave):
|
|||||||
LOG_WARN(f"add_peer id={peer_id} > {self._peers_limit}")
|
LOG_WARN(f"add_peer id={peer_id} > {self._peers_limit}")
|
||||||
return
|
return
|
||||||
|
|
||||||
LOG_TRACE(f"add_peer id={peer_id}")
|
status_message = f"From {self.name}"
|
||||||
|
LOG_TRACE(f"GC.add_peer id={peer_id} status_message={status_message}")
|
||||||
peer = GroupChatPeer(peer_id,
|
peer = GroupChatPeer(peer_id,
|
||||||
self._tox.group_peer_get_name(self._number, peer_id),
|
self._tox.group_peer_get_name(self._number, peer_id),
|
||||||
self._tox.group_peer_get_status(self._number, peer_id),
|
self._tox.group_peer_get_status(self._number, peer_id),
|
||||||
self._tox.group_peer_get_role(self._number, peer_id),
|
self._tox.group_peer_get_role(self._number, peer_id),
|
||||||
self._tox.group_peer_get_public_key(self._number, peer_id),
|
self._tox.group_peer_get_public_key(self._number, peer_id),
|
||||||
is_current_user)
|
is_current_user,
|
||||||
|
status_message=status_message)
|
||||||
self._peers.append(peer)
|
self._peers.append(peer)
|
||||||
|
|
||||||
def remove_peer(self, peer_id):
|
def remove_peer(self, peer_id):
|
||||||
|
@ -5,16 +5,17 @@ class GroupChatPeer:
|
|||||||
Represents peer in group chat.
|
Represents peer in group chat.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, peer_id, name, status, role, public_key, is_current_user=False, is_muted=False):
|
def __init__(self, peer_id, name, status, role, public_key, is_current_user=False, is_muted=False, status_message=None):
|
||||||
self._peer_id = peer_id
|
self._peer_id = peer_id
|
||||||
self._name = name
|
self._name = name
|
||||||
self._status = status
|
self._status = status
|
||||||
|
self._status_message = status_message
|
||||||
self._role = role
|
self._role = role
|
||||||
self._public_key = public_key
|
self._public_key = public_key
|
||||||
self._is_current_user = is_current_user
|
self._is_current_user = is_current_user
|
||||||
self._is_muted = is_muted
|
self._is_muted = is_muted
|
||||||
# unused?
|
|
||||||
self._kind = 'grouppeer'
|
self._kind = 'grouppeer'
|
||||||
|
|
||||||
# Readonly properties
|
# Readonly properties
|
||||||
|
|
||||||
def get_id(self):
|
def get_id(self):
|
||||||
@ -32,6 +33,11 @@ class GroupChatPeer:
|
|||||||
|
|
||||||
is_current_user = property(get_is_current_user)
|
is_current_user = property(get_is_current_user)
|
||||||
|
|
||||||
|
def get_status_message(self):
|
||||||
|
return self._peer_status_message
|
||||||
|
|
||||||
|
status_message = property(get_status_message)
|
||||||
|
|
||||||
# Read-write properties
|
# Read-write properties
|
||||||
|
|
||||||
def get_name(self):
|
def get_name(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user