undo accidental changes

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-03-30 14:13:08 +01:00
parent c6d69f3d3f
commit 559b8e174b
2 changed files with 20 additions and 2 deletions

View file

@ -269,7 +269,7 @@ export const Commands = [
const ev = cli.getRoom(roomId).currentState.getStateEvents('m.room.member', cli.getUserId());
const content = {
...ev ? ev.getContent() : { membership: 'join' },
displaycommand: args,
displayname: args,
};
return success(cli.sendStateEvent(roomId, 'm.room.member', content, cli.getUserId()));
}
@ -887,6 +887,24 @@ export const Commands = [
},
category: CommandCategories.advanced,
}),
new Command({
command: "whois",
description: _td("Displays information about a user"),
args: "<user-id>",
runFn: function (roomId, userId) {
if (!userId || !userId.startsWith("@") || !userId.includes(":")) {
return reject(this.getUsage());
}
const member = MatrixClientPeg.get().getRoom(roomId).getMember(userId);
dis.dispatch({
action: 'view_user',
member: member || {userId},
});
return success();
},
category: CommandCategories.advanced,
}),
// Command definitions for autocompletion ONLY:
// /me is special because its not handled by SlashCommands.js and is instead done inside the Composer classes