more robust handling of message queue

This commit is contained in:
cidoku 2026-03-22 20:54:49 -03:00
parent 1d349bf8b3
commit 508da57573

View File

@ -3361,10 +3361,12 @@ class GUI(QtGui.QWidget):
fShowname = mChatMessage[SHOWNAME]
if self.messageQueue:
chatMsgComp = decodeAOString(self.messageQueue[0].split('#')[5]).strip()
examine = chatMsgComp == ">" or chatMsgComp == "<" or chatMsgComp == "="
special = not chatMsgComp
if examine or (fCharId == self.myChar and (special or mChatMessage[CHATMSG] == chatMsgComp)): # our message showed up
chatMsgComp = decodeAOString(self.messageQueue[0].split('#')[CHATMSG]).strip()
# This is for servers that support witness testimonies
examine = chatMsgComp[0] in [">", "<", "="] and (
len(chatMsgComp) == 1 or chatMsgComp[1:].isdigit()
) if chatMsgComp else False
if fCharId == self.myChar or examine: # our message showed up
del self.messageQueue[0]
self.queueItems.takeItem(0)
if self.cbAdditive.isChecked():