Skip to content

Commit 75d0145

Browse files
committed
fix(pmp-command): fix usepmp command handling and description
1 parent ba18d25 commit 75d0145

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/app/hooks/useCommands.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,13 +562,13 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
562562
[Command.UsePerMessageProfile]: {
563563
name: Command.UsePerMessageProfile,
564564
description:
565-
'Use a per message profile for this room once, or until reset. Example: /usepmp profileId [once,reset,or duration like 1h30m]',
565+
'Use a per message profile for this room once, or until reset. Example: /usepmp [profileId,reset]',
566566
exe: async (payload) => {
567567
// this command doesn't need to do anything, the composer will pick it up and apply the profile to the message being composed
568568
const profileId: string = splitWithSpace(payload)[0];
569569
const durationStr: string | undefined = splitWithSpace(payload)[1];
570570
let validUntil: number | undefined;
571-
if (durationStr === 'reset') {
571+
if (profileId.normalize() === 'reset') {
572572
setCurrentlyUsedPerMessageProfileIdForRoom(mx, room.roomId, undefined, undefined, true)
573573
.then(() => {
574574
sendFeedback('Per message profile reset for this room.', room, mx.getSafeUserId());

0 commit comments

Comments
 (0)