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
Element-R: Report events with withheld keys separately to Posthog. (#12755)
* Remove refs to deprecated method `MatrixEvent.isEncryptedDisabledForUnverifiedDevices` is now deprecated * Report new posthog code for withheld message keys
This commit is contained in:
committed by
GitHub
parent
c894bebaa0
commit
19f9f98564
@ -50,18 +50,15 @@ describe("DecryptionFailureBody", () => {
|
||||
expect(container).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it(`Should display "The sender has blocked you from receiving this message"`, () => {
|
||||
it(`Should display "The sender has blocked you from receiving this message"`, async () => {
|
||||
// When
|
||||
const event = mkEvent({
|
||||
type: "m.room.message",
|
||||
room: "myfakeroom",
|
||||
user: "myfakeuser",
|
||||
content: {
|
||||
msgtype: "m.bad.encrypted",
|
||||
},
|
||||
event: true,
|
||||
const event = await mkDecryptionFailureMatrixEvent({
|
||||
code: DecryptionFailureCode.MEGOLM_KEY_WITHHELD_FOR_UNVERIFIED_DEVICE,
|
||||
msg: "withheld",
|
||||
roomId: "myfakeroom",
|
||||
sender: "myfakeuser",
|
||||
});
|
||||
jest.spyOn(event, "isEncryptedDisabledForUnverifiedDevices", "get").mockReturnValue(true);
|
||||
|
||||
const { container } = customRender(event);
|
||||
|
||||
// Then
|
||||
|
Reference in New Issue
Block a user