1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2026-01-03 21:42:32 +03:00

a workaround to make ocnfetti work on recipient side.

changed the implementation of on.Event.decrypted function
This commit is contained in:
nurjinn jafar
2020-08-25 16:39:57 +02:00
parent 4527755f7e
commit 5753c96431
2 changed files with 13 additions and 13 deletions

View File

@@ -1029,15 +1029,16 @@ export const Commands = [
args: '<message>',
runFn: function(roomId, args) {
return success((async () => {
const cli = MatrixClientPeg.get();
const userId = cli.getUserId();
const userName = userId.slice(1).split(":").slice(0, 1);
const isChatEffectsDisabled = SettingsStore.getValue('dontShowChatEffects');
if ((!args) || (!args && isChatEffectsDisabled)) {
args = _t("* %(userName)s sends confetti", {userName});
args = _t("sends confetti");
MatrixClientPeg.get().sendEmoteMessage(roomId, args);
} else {
MatrixClientPeg.get().sendHtmlMessage(roomId, args);
}
if (!isChatEffectsDisabled) {
dis.dispatch({action: 'confetti'});
}
cli.sendHtmlMessage(roomId, args,
dis.dispatch({action: 'confetti'}));
})());
},
category: CommandCategories.actions,