@@ -198,7 +198,7 @@ const dmCloseAction = <Path extends string>(_path: Path): TypedAction<typeof dmC
198198 } else {
199199 const canAccess = await canAccessRoomIdAsync ( roomId , this . userId ) ;
200200 if ( ! canAccess ) {
201- return API . v1 . forbidden ( 'error-not-allowed' ) ;
201+ return API . v1 . forbidden ( ) ;
202202 }
203203
204204 const { subscription : subs } = await findDirectMessageRoom ( { roomId } , this . userId ) ;
@@ -247,7 +247,7 @@ const dmOpenAction = <Path extends string>(_path: Path): TypedAction<typeof dmOp
247247 const { roomId } = this . bodyParams ;
248248 const canAccess = await canAccessRoomIdAsync ( roomId , this . userId ) ;
249249 if ( ! canAccess ) {
250- return API . v1 . forbidden ( 'error-not-allowed' ) ;
250+ return API . v1 . forbidden ( ) ;
251251 }
252252
253253 const { room, subscription } = await findDirectMessageRoom ( { roomId } , this . userId ) ;
@@ -302,7 +302,7 @@ const dmSetTopicAction = <Path extends string>(_path: Path): TypedAction<typeof
302302
303303 const canAccess = await canAccessRoomIdAsync ( roomId , this . userId ) ;
304304 if ( ! canAccess ) {
305- return API . v1 . forbidden ( 'error-not-allowed' ) ;
305+ return API . v1 . forbidden ( ) ;
306306 }
307307
308308 const { room } = await findDirectMessageRoom ( { roomId } , this . userId ) ;
@@ -387,14 +387,14 @@ const dmCountersAction = <Path extends string>(_path: Path): TypedAction<typeof
387387
388388 if ( ruserId ) {
389389 if ( ! access ) {
390- return API . v1 . forbidden ( 'error-not-allowed' ) ;
390+ return API . v1 . forbidden ( ) ;
391391 }
392392 user = ruserId ;
393393 }
394394 const canAccess = await canAccessRoomIdAsync ( roomId , user ) ;
395395
396396 if ( ! canAccess ) {
397- return API . v1 . forbidden ( 'error-not-allowed' ) ;
397+ return API . v1 . forbidden ( ) ;
398398 }
399399
400400 const { room, subscription } = await findDirectMessageRoom ( { roomId } , user ) ;
@@ -466,7 +466,7 @@ const dmFilesAction = <Path extends string>(_path: Path): TypedAction<typeof dmF
466466
467467 const canAccess = await canAccessRoomIdAsync ( room . _id , this . userId ) ;
468468 if ( ! canAccess ) {
469- return API . v1 . forbidden ( 'error-not-allowed' ) ;
469+ return API . v1 . forbidden ( ) ;
470470 }
471471
472472 const filter = {
@@ -528,7 +528,7 @@ const dmMembersAction = <Path extends string>(_path: Path): TypedAction<typeof d
528528
529529 const canAccess = await canAccessRoomIdAsync ( room . _id , this . userId ) ;
530530 if ( ! canAccess ) {
531- return API . v1 . forbidden ( 'error-not-allowed' ) ;
531+ return API . v1 . forbidden ( ) ;
532532 }
533533
534534 const { offset, count } = await getPaginationItems ( this . queryParams ) ;
@@ -641,7 +641,7 @@ const dmMessagesAction = <Path extends string>(_path: Path): TypedAction<typeof
641641
642642 const canAccess = await canAccessRoomIdAsync ( room . _id , this . userId ) ;
643643 if ( ! canAccess ) {
644- return API . v1 . forbidden ( 'error-not-allowed' ) ;
644+ return API . v1 . forbidden ( ) ;
645645 }
646646
647647 const { offset, count } = await getPaginationItems ( this . queryParams ) ;
@@ -727,7 +727,7 @@ const dmHistoryAction = <Path extends string>(_path: Path): TypedAction<typeof d
727727 const result = await getChannelHistory ( objectParams ) ;
728728
729729 if ( ! result ) {
730- return API . v1 . forbidden ( 'error-not-allowed' ) ;
730+ return API . v1 . forbidden ( ) ;
731731 }
732732
733733 return API . v1 . success ( result as Record < string , unknown > ) ;
0 commit comments