From f1032acc7a94112952b64674bf4e57370bf6f3d9 Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Fri, 18 Mar 2022 16:15:36 +0530 Subject: [PATCH] Add invite sound Signed-off-by: Ajay Bura --- public/sound/invite.ogg | Bin 0 -> 12796 bytes src/client/state/Notifications.js | 17 ++++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 public/sound/invite.ogg diff --git a/public/sound/invite.ogg b/public/sound/invite.ogg new file mode 100644 index 0000000000000000000000000000000000000000..aa220144c17d1e9859e076cbf1898ff4ce06bd19 GIT binary patch literal 12796 zcmeHtcT^Kw+wU`JgwO&8j0h5{p$Zx}fXWF~h@uHynn(>zP_QBDNYNM(5CIV^p$ZW! zG! zp}Wu@EyUO1kq95AS*}B_O@%2sj_ zm1ld|e$vi~b6%zOQ-+bVXJIzQxr>?O;f&sZ;&7CabH%w{JIBm{s+Ys!L~BAJfTW5o zu42>Z+RZfR0-$pRjEhTkE^X7fbXZ4;sa{PMYnQOWbzYM+X^^13wnqsA}8=ZAE5O_1N#pFCDt(S073 z7F-y5w2S`FF5~^iK}PfC(l>5h{J@mj`$EX_P>xI~KdH!_!9Hr*%5;+ZwnSLIE=V$pJS{Nnhku|;*JvduZV zt9jEoAKzr#+d+wcIJ_v&ZVd=dY-;o2nbsEj(8lp&A?#f!lcEa+@+U`%O!w_tMl-Ab z2`5Xg8h{0V>h!4V{_A|Jb3@%&pn*=yo6~J?`nvlskGWI2eBqI`A$N1bKCXR;&QHr1 z2bIPw{4eLvsUtsUA!GkJ5z`CIw5tw-M#c1hOcN;-QWFtoSY&8g zWMEqK)IQ(Hi!1Ch11?4Gk>V%p{HOLsMqWk6@kMc~OY3)*5AEDzCLQkrba@x~A+B2` zZdfI*UzI;7DiZE2t#2qdzg+jKCy4lFz)lQ^!K&w^KtL<_5a@;-Zwek z6A-Y9P>4Yx-Ph9cLb>7=qsZQb{gNnUpI5bqJkh*EASKiJh-n z)^wYiG~M=d$z{}(MVV>(sQ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Lw%HCPe9uw_1DaZ`Jzx*P8RPefFSF$`I z_-VP{Dkha(CTPi5Me2ucM<{c?9>JU&bHMXRQ-C^@^VN+t5D_`E6xhEDf!j!cHw#G6 z0qS@oPL%8B-rKR0Sm;pT9ovkw@0HK4%5{@?ar7f4wRTb1oxy9LHx(f;k@qy1BOY91 z(J!YV7SgK7J~MkOP>@8E<+*2)wr&Oo3J)QBszNp(1X&5(!iJ$1Jmkjw(XC}I;b`xV zQ@8C`{n~17x__YMf2^Ed$PmOPJEIgQj|b2wP}gj$Qo)B70G{7Uo8ipdh$0&POqJ3< zp%#-(RDv-@u0n(g-wYpzP4f99G3aK>TFW!PtTB$B?6kV;v_kpgnYit@+jlfFTLN9$ z2N2UyU%0u^lxpq%b1LV8>26!EZt0j@SU}f(j13c- zRQVY=gl`&a$^N_&X7#=a`#Ly#)qbOh&V8z%;}k~Uz^aRu}NMX|7Xe64C-l|YKJ zoOxpYL_)kj8y|LSsr1^XJsXo;Iu5Mi-#`|p3EdNZE{7HD<=VGA!&wQu$HwP-0+SGj ze_nXnxa_$qcj$PH{TFc)V(`3(*2P6J>d0HbFF8opGGI>UnbzUUJKrQqN4`8e^W@d1 zgC!@N5_royFxj!s=LaL>!OAvJTh@&Bxx44+X#r(c*$YaU20Y3cv;BQY|3FCm$*qa2 v?DW@rug(y?3 this._playNotiSounds(); + noti.onshow = () => this._playNotiSound(); } noti.onclick = () => selectRoom(room.roomId, mEvent.getId()); } else { - this._playNotiSounds(); + this._playNotiSound(); } } - _playNotiSounds() { + _playNotiSound() { if (!this._notiAudio) { this._notiAudio = new Audio(NotificationSound); } this._notiAudio.play(); } + _playInviteSound() { + if (!this._inviteAudio) { + this._inviteAudio = new Audio(InviteSound); + } + this._inviteAudio.play(); + } + _listenEvents() { this.matrixClient.on('Room.timeline', (mEvent, room) => { if (room.isSpaceRoom()) return; @@ -316,6 +324,9 @@ class Notifications extends EventEmitter { if (membership === 'leave' && this.hasNoti(room.roomId)) { this.deleteNoti(room.roomId); } + if (membership === 'invite') { + this._playInviteSound(); + } }); } }