@@ -493,34 +493,7 @@ export default class EmbeddedChatApi {
493493
494494 async getRoomInfo ( ) {
495495 try {
496- const { userId, authToken } = ( await this . auth . getCurrentUser ( ) ) || { } ;
497- const response = await fetch (
498- `${ this . host } /api/v1/method.call/rooms%3Aget` ,
499- {
500- body : JSON . stringify ( {
501- message : JSON . stringify ( {
502- msg : "method" ,
503- id : null ,
504- method : "rooms/get" ,
505- params : [ ] ,
506- } ) ,
507- } ) ,
508- headers : {
509- "Content-Type" : "application/json" ,
510- "X-Auth-Token" : authToken ,
511- "X-User-Id" : userId ,
512- } ,
513- method : "POST" ,
514- }
515- ) ;
516-
517- const result = await response . json ( ) ;
518-
519- if ( result . success && result . message ) {
520- const parsedMessage = JSON . parse ( result . message ) ;
521- return parsedMessage ;
522- }
523- return null ;
496+ return await this . channelInfo ( ) ;
524497 } catch ( err ) {
525498 console . error ( err ) ;
526499 }
@@ -699,22 +672,14 @@ export default class EmbeddedChatApi {
699672 try {
700673 const { userId, authToken } = ( await this . auth . getCurrentUser ( ) ) || { } ;
701674 const response = await fetch (
702- `${ this . host } /api/v1/method.call/getUserRoles ` ,
675+ `${ this . host } /api/v1/roles.getUsersInPublicRoles ` ,
703676 {
704- body : JSON . stringify ( {
705- message : JSON . stringify ( {
706- msg : "method" ,
707- id : null ,
708- method : "getUserRoles" ,
709- params : [ ] ,
710- } ) ,
711- } ) ,
712677 headers : {
713678 "Content-Type" : "application/json" ,
714679 "X-Auth-Token" : authToken ,
715680 "X-User-Id" : userId ,
716681 } ,
717- method : "POST " ,
682+ method : "GET " ,
718683 }
719684 ) ;
720685
0 commit comments