refactor(chat_manager.py): prevent notification when message is a FileResponse instance
This commit is contained in:
parent
4dcfd9d1db
commit
9f8b474a36
1 changed files with 2 additions and 1 deletions
|
|
@ -23,6 +23,7 @@ class ChatHistory(Subject):
|
||||||
"""Add a message to the chat history."""
|
"""Add a message to the chat history."""
|
||||||
|
|
||||||
self.history[client_id].append(message)
|
self.history[client_id].append(message)
|
||||||
|
if not isinstance(message, FileResponse):
|
||||||
self.notify()
|
self.notify()
|
||||||
|
|
||||||
def get_history(self, client_id: str, filter=True) -> List[ChatMessage]:
|
def get_history(self, client_id: str, filter=True) -> List[ChatMessage]:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue