diff --git a/src/assets/sounds/FriendRequest.mp3 b/src/assets/sounds/FriendRequest.mp3 index baf6a4a..55bbf23 100644 Binary files a/src/assets/sounds/FriendRequest.mp3 and b/src/assets/sounds/FriendRequest.mp3 differ diff --git a/src/assets/sounds/Mention.mp3 b/src/assets/sounds/Mention.mp3 new file mode 100644 index 0000000..fa4b71a Binary files /dev/null and b/src/assets/sounds/Mention.mp3 differ diff --git a/src/assets/sounds/Message.mp3 b/src/assets/sounds/Message.mp3 new file mode 100644 index 0000000..fcde42a Binary files /dev/null and b/src/assets/sounds/Message.mp3 differ diff --git a/src/assets/sounds/Notification.mp3 b/src/assets/sounds/Notification.mp3 deleted file mode 100644 index 49c40a6..0000000 Binary files a/src/assets/sounds/Notification.mp3 and /dev/null differ diff --git a/src/store/modules/notificationsModule.js b/src/store/modules/notificationsModule.js index 4f7e497..f35ee9e 100644 --- a/src/store/modules/notificationsModule.js +++ b/src/store/modules/notificationsModule.js @@ -25,7 +25,7 @@ const actions = { (currentTab !== 1 && currentTab !== 2) || !document.hasFocus() ) { - NotificationSounds.notification(); + NotificationSounds.notification(mentioned); } let find = context.state.notifications.find(item => { return item.channelID === channelID; diff --git a/src/utils/notificationSound.js b/src/utils/notificationSound.js index 71042c5..60ada9f 100644 --- a/src/utils/notificationSound.js +++ b/src/utils/notificationSound.js @@ -1,11 +1,13 @@ -import notificationSound from "@/assets/sounds/Notification.mp3"; +import messageSound from "@/assets/sounds/Message.mp3"; +import mentionSound from "@/assets/sounds/Mention.mp3"; import newFriendSound from "@/assets/sounds/FriendRequest.mp3"; + import { store } from "@/store/index"; export default { - notification: () => { + notification: mentioned => { if (isBusy() || isNotificationDisabled()) return; - const audio = new Audio(notificationSound); + const audio = new Audio(mentioned ? mentionSound : messageSound); audio.play(); }, newFriend: () => {