diff --git a/src/controller/mainController.py b/src/controller/mainController.py index 26fc5b8..d61a61b 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -287,6 +287,7 @@ class Controller(object): buffer = self.search_chat_buffer(obj.user_id) if buffer == None: wx.CallAfter(self.chat_from_id, obj.user_id) + self.session.soundplayer.play("chat.ogg") return # If the chat already exists, let's create a dictionary wich will contains data of the received message. message = {"id": obj.message_id, "user_id": obj.user_id, "date": obj.timestamp, "body": obj.text, "attachments": obj.attachments} @@ -300,3 +301,4 @@ class Controller(object): # ToDo: Clean this code and test how is the database working with this set to True. num = self.session.order_buffer(buffer.name, data, True) buffer.insert(self.session.db[buffer.name]["items"][-1], False) + self.session.soundplayer.play("chat.ogg") \ No newline at end of file diff --git a/src/sounds/default/chat.ogg b/src/sounds/default/chat.ogg new file mode 100644 index 0000000..78955d4 Binary files /dev/null and b/src/sounds/default/chat.ogg differ