mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Add a function to send a rageshake from the console
This is mostly useful for cases when the UI is broken or the user can't access the button because they aren't logged in. This is particularly helpful for troubleshooting issues with .well-known discovery if/when they come up. Ref: https://github.com/vector-im/riot-web/issues/4802
This commit is contained in:
parent
b5c27ca074
commit
710e295b44
@ -26,6 +26,7 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import rageshake from "matrix-react-sdk/lib/rageshake/rageshake";
|
import rageshake from "matrix-react-sdk/lib/rageshake/rageshake";
|
||||||
|
import SdkConfig from "matrix-react-sdk/src/SdkConfig";
|
||||||
|
|
||||||
function initRageshake() {
|
function initRageshake() {
|
||||||
rageshake.init().then(() => {
|
rageshake.init().then(() => {
|
||||||
@ -44,3 +45,17 @@ function initRageshake() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
initRageshake();
|
initRageshake();
|
||||||
|
|
||||||
|
global.mxSendRageshake = function(text, withLogs) {
|
||||||
|
require(['matrix-react-sdk/lib/rageshake/submit-rageshake'], (s) => {
|
||||||
|
s(SdkConfig.get().bug_report_endpoint_url, {
|
||||||
|
userText: text,
|
||||||
|
sendLogs: withLogs,
|
||||||
|
progressCallback: console.log,
|
||||||
|
}).then(() => {
|
||||||
|
console.log("Bug report sent!");
|
||||||
|
}, (err) => {
|
||||||
|
console.error(err);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user