Conversation
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
|
@lauridskern can you please comment signing the CLA as instructed? i will try to rerun the job |
|
I have read the CLA Document and I hereby sign the CLA |
|
recheck |
|
@lauridskern CLA passing now, thanks! |
|
Awesome! Thanks for your assistance |
c4c87c3 to
594d0c8
Compare
|
@shawnborton @aimane-chnaif One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Hmm, QR build seems to be failed @lauridskern please fix conflict |
|
@shawnborton @thesahindia @ One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@aimane-chnaif can you please review this? I added puller bear and it also assigned @thesahindia - whoever can prioritize this, please help us get this merged. Thanks! |
|
yes, was waiting for conflict to be fixed. 4.7k commits are behind |
|
Hi there, can we please try to move this one forward? |
|
@lauridskern bump for fixing conflict |
|
Ah, I was mostly thinking that we already save a user's preference for muting rooms across devices, right? So we could just use that to inform whether or not sounds should play if the user has sounds enabled but the room is muted. Otherwise I think it's fine that we use local preferences for sound given that you might want sound on your desktop app but not mobile for instance. |
yes, this is already in place.
alright, yes, it makes sense 👍 Thanks! |
Ok, so this is good to merge once you create constants @kirillzyusko |
|
@cristipaval done 👍 |
|
DANG! it has conflicts. Could you please resolve them, @kirillzyusko 🙏 |
|
@cristipaval sure, I'm on it 👀 |
…imation-and-sound
|
@cristipaval merged upstream 👍 |
|
I think you mean @cristipaval :) |
|
@shawnborton you are absolutely right, @christianwen sorry for disturbing you 😅 @cristipaval can we merge this PR? 👀 |
|
Merged 🚀 Thanks for the work here! 🙏 |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.41-12 🚀
|
| }); | ||
|
|
||
| function playSoundForMessageType(pushJSON: OnyxServerUpdate[]) { | ||
| const reportActionsOnly = pushJSON.filter((update) => update.key.includes('reportActions_')); |
There was a problem hiding this comment.
There's case of key not existing in update, which lead to #36632.
i.e. CloseAccount pusher event
|
FYI, We need to use browser caching to resolve offline sound playback. Issue: #47148 |
| }; | ||
|
|
||
| push(title, body, icon, data, onClick); | ||
| push(title, body, icon, data, onClick, true); |
There was a problem hiding this comment.
Coming from here #53700 Passing silent: true here has also disabled the custom notification sound for the web and desktop. We fixed it here #53700 (comment) by passing silent: false, and when silent: false, the custom sound plays.
|
There seems no upstream issue for the |
Details
This PR implements sounds playing when message gets received (only when app is in foreground, i. e. not sounds for push notifications).
To play a sound I used
react-native-sound( andreact-native-web-soundfor web, underhood it useshowler.js). Initially I wanted to useexpo-soundbut was getting ridiculous errors and couldn't resolve them (on iOS and web).Fixed Issues
$ #29835
PROPOSAL: N/A
Tests
@herealso should produce the sound);Offline tests
QA Steps
@herealso should produce the sound);PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android-demo-sound-truncated.mp4
Android: mWeb Chrome
iOS: Native
iOS-sound-demo.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
web-sound-demo.mov
MacOS: Desktop
desktop-demo-sounds.mov