Jisti settings not set in server MongoDb

Hi:

Description

I have deployed rocket chat version 5.0.0 with Docker, and installed Jitsi for videocall conference through the Rocket Appstore. It is set up and works fine. Since I need it to connect to an Android client I found out that when this client app fetches for the settings wit hthe following api call example: [RCHost]/api/v1/settings.public?query={“_id”:{“$in”:[“LDAP_Enable”, “Jitsi_Enabled”]}} (as shows in the official documentation . It does not return the information needed.
So I went into the mongoDb attached to the server and the following options (which the android client needs) do not exist at all in the database:
Jitsi_Enabled
Jisti_Enable_Channels
Jitsi_SSL
Jitsi_Domain
Jitsi_URL_Room_Prefix

The only settings I found regarding Jitsi that are set in the database are:
Jitsi_Click_To_Join_Count
Jitsi_Start_SlashCommands_Count

I looked all over the settings in the admin panel for rocketchat and Jitsi and did not find a place to set or sync these configs.
I would appreciate some help to solve this. Thanks in advance.

Server Setup Information

  • Version of Rocket.Chat Server: 5.0.0
  • Operating System: Ubuntu Server
  • Deployment Method: Dokcer
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: v14.18.3
  • MongoDB Version: 4.4.16 / wiredTiger
  • Proxy: nginx
  • Firewalls involved:

Hi!

Since Jitsi is provided now as an App, it’s configuration is tied to that app, and lives in rocketchat_apps collection.

So, because of that, you can’t change it’s settings using the API anymore :frowning:

I see. I did think that was the case, but since the example provided in the documentation shows the axact setting I was looking for I thought the problem was some missconfiguration at my end.

Is there an exposed endpoint, in the current version that we could use to request the information we need?
We looked throught the code but couldn’t find it. Also tried to find it in the react native code.

This is the info we need to fetch in order to allow the videocall in our app:
Jitsi_Enabled
Jisti_Enable_Channels
Jitsi_SSL
Jitsi_Domain
Jitsi_URL_Room_Prefix

You can always use the same API endpoint that the browser uses, something like (may be different in your workspace, check the network tab in your browser while saving the app settings):

http://localhost:3000/api/apps/3b387ba9-f57c-44c6-9810-8c0256abd64c/settings

if you do a GET on this API with the auth creds, you will fetch the settings, and a POST will change them.

let me know if this helps

1 Like

Very helpfull thanks a lot. Just have to parse some info and make a few api calls and we will be able to gather the info we need.

1 Like

I just found an issue getting the information this way. Since the info is displayed only in the admin panel a regular user without access to it does not have the required permission. So I got the following response:
{
“success”: false,
“error”: “User does not have the permissions required for this action [error-unauthorized]”
}

I tried fetching from “[MyRocketChatHost]/api/apps/”
and set :
X-Auth-Token: *****
X-User-Id: *****
in the headers. When the credentials belong to an admin I do get the info needed, but the users connecting via our android app do not have this kind of permission.
Do you know how this happens to be handeled in newer versions of the mobile app? Maybe the ReactNative project or The Node.js SDK?

Hi!

Not sure why your users would need access to that information :confused: What is your use case here?

Probably this is controlled by the manage-apps permission, but giving that permission to your users would be allowing them to effectively manage apps (turning it on/off for example)

The case is the next. The android app has these setting fields:
Jitsi_Enabled
Jisti_Enable_Channels
Jitsi_SSL
Jitsi_Domain
Jitsi_URL_Room_Prefix.
which in older server versions were accessed through the settings api.
According to how they are set, for example Jitsi_Enabled = true, it would allow the logged in user to use the videocall functionality. But since the settings api does not return these values anymore it is never set to true. So the videocall doesn’t work.
I’m trying to fetch these setting in any other way.
I do understand that this is happening because we use an old RocketChat android native version embedded within our app. So I figured that maybe the current RocketChat mobile app(made in react native) would have some similar way to fetch these info and I could use that.