Update algorithm for history visible banner. (#31577)
* feat: Update algorithm for history visible banner. - The banner now only shows for rooms with `shared` or `worldReadable` history visibility. - The banner does not show in rooms in which the current user cannot send messages. * tests: Add `getHistoryVisibility` to stub room. * docs: Add description to `visible` condition check. * docs: Fix spelling. Co-authored-by: Florian Duros <florian.duros@ormaz.fr> * chore: Remove `jest-sonar.xml`. --------- Co-authored-by: Florian Duros <florian.duros@ormaz.fr>
This commit is contained in:
@@ -677,6 +677,7 @@ export function mkStubRoom(
|
||||
getCanonicalAlias: jest.fn(),
|
||||
getDMInviter: jest.fn(),
|
||||
getEventReadUpTo: jest.fn(() => null),
|
||||
getHistoryVisibility: jest.fn().mockReturnValue(HistoryVisibility.Joined),
|
||||
getInvitedAndJoinedMemberCount: jest.fn().mockReturnValue(1),
|
||||
getJoinRule: jest.fn().mockReturnValue("invite"),
|
||||
getJoinedMemberCount: jest.fn().mockReturnValue(1),
|
||||
|
||||
Reference in New Issue
Block a user