You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Slash command to discard megolm session
For faster crypto debugging Requires https://github.com/matrix-org/matrix-js-sdk/pull/704
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright 2015, 2016 OpenMarket Ltd
|
||||
Copyright 2018 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -470,6 +471,19 @@ export const CommandMap = {
|
||||
description: _td('Displays action'),
|
||||
hideCompletionAfterSpace: true,
|
||||
}),
|
||||
|
||||
discardsession: new Command({
|
||||
name: 'discardsession',
|
||||
description: _td('Forces the current outbound group session in an encrypted room to be discarded'),
|
||||
runFn: function(roomId) {
|
||||
try {
|
||||
MatrixClientPeg.get().forceDiscardSession(roomId);
|
||||
} catch (e) {
|
||||
return reject(e.message);
|
||||
}
|
||||
return success();
|
||||
},
|
||||
}),
|
||||
};
|
||||
/* eslint-enable babel/no-invalid-this */
|
||||
|
||||
@@ -477,6 +491,7 @@ export const CommandMap = {
|
||||
// helpful aliases
|
||||
const aliases = {
|
||||
j: "join",
|
||||
newballsplease: "discardsession",
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user