From 3773c5902c5641065447f975dd5c74d85f44fa37 Mon Sep 17 00:00:00 2001 From: Vishal Date: Fri, 21 Jun 2024 01:12:28 +0530 Subject: [PATCH] Removed sending chat msgs with no text --- src/assets/ba_data/python/bauiv1lib/party.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/assets/ba_data/python/bauiv1lib/party.py b/src/assets/ba_data/python/bauiv1lib/party.py index 3e52fd45..d54fd46a 100644 --- a/src/assets/ba_data/python/bauiv1lib/party.py +++ b/src/assets/ba_data/python/bauiv1lib/party.py @@ -578,8 +578,10 @@ class PartyWindow(bui.Window): self._popup_party_member_is_host = is_host def _send_chat_message(self) -> None: - bs.chatmessage(cast(str, bui.textwidget(query=self._text_field))) - bui.textwidget(edit=self._text_field, text='') + text = cast(str, bui.textwidget(query=self._text_field)).strip() + if text != '': + bs.chatmessage(text) + bui.textwidget(edit=self._text_field, text='') def close(self) -> None: """Close the window."""