You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Avoid error when DMing oneself (#11754)
* Avoid error when DMing oneself Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update comment Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Add test Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
7f37699566
commit
fd08e74275
@ -142,6 +142,15 @@ describe("createRoom", () => {
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it("should strip self-invite", async () => {
|
||||
await createRoom(client, { dmUserId: client.getSafeUserId() });
|
||||
expect(client.createRoom).toHaveBeenCalledWith(
|
||||
expect.not.objectContaining({
|
||||
invite: expect.any(Array),
|
||||
}),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("canEncryptToAllUsers", () => {
|
||||
|
Reference in New Issue
Block a user