You've already forked matrix-react-sdk
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user