Fix regressions around media uploads failing and causing soft crashes (#9549)

This commit is contained in:
Michael Telatynski 2022-11-07 11:56:43 +00:00 committed by GitHub
parent be5a8ca3b9
commit 77764d80bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 218 deletions

View file

@ -232,6 +232,15 @@ describe("Notifier", () => {
});
});
describe("getSoundForRoom", () => {
it("should not explode if given invalid url", () => {
jest.spyOn(SettingsStore, "getValue").mockImplementation((name: string) => {
return { url: { content_uri: "foobar" } };
});
expect(Notifier.getSoundForRoom("!roomId:server")).toBeNull();
});
});
describe("_playAudioNotification", () => {
it.each([
{ event: { is_silenced: true }, count: 0 },