This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -446,7 +446,11 @@ export const Commands = [
446446 return success ( cli . setRoomTopic ( roomId , args ) ) ;
447447 }
448448 const room = cli . getRoom ( roomId ) ;
449- if ( ! room ) return reject ( newTranslatableError ( "Failed to set topic" ) ) ;
449+ if ( ! room ) {
450+ return reject (
451+ newTranslatableError ( "Failed to set topic: Unable to find room (%(roomId)s" , { roomId } ) ,
452+ ) ;
453+ }
450454
451455 const topicEvents = room . currentState . getStateEvents ( 'm.room.topic' , '' ) ;
452456 const topic = topicEvents && topicEvents . getContent ( ) . topic ;
@@ -841,7 +845,11 @@ export const Commands = [
841845 if ( ! isNaN ( powerLevel ) ) {
842846 const cli = MatrixClientPeg . get ( ) ;
843847 const room = cli . getRoom ( roomId ) ;
844- if ( ! room ) return reject ( newTranslatableError ( "Command failed" ) ) ;
848+ if ( ! room ) {
849+ return reject (
850+ newTranslatableError ( "Command failed: Unable to find room (%(roomId)s" , { roomId } ) ,
851+ ) ;
852+ }
845853 const member = room . getMember ( userId ) ;
846854 if ( ! member || getEffectiveMembership ( member . membership ) === EffectiveMembership . Leave ) {
847855 return reject ( newTranslatableError ( "Could not find user in room" ) ) ;
You can’t perform that action at this time.
0 commit comments