mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
Fix an issue with conversation password not being applied to calls
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
3bc67946ca
commit
d81707b496
@ -208,6 +208,7 @@ public class CallController extends BaseController {
|
|||||||
private WebSocketConnectionHelper webSocketConnectionHelper;
|
private WebSocketConnectionHelper webSocketConnectionHelper;
|
||||||
private boolean hasMCU;
|
private boolean hasMCU;
|
||||||
private boolean hasExternalSignalingServer;
|
private boolean hasExternalSignalingServer;
|
||||||
|
private String conversationPassword;
|
||||||
|
|
||||||
public CallController(Bundle args) {
|
public CallController(Bundle args) {
|
||||||
super(args);
|
super(args);
|
||||||
@ -216,16 +217,13 @@ public class CallController extends BaseController {
|
|||||||
roomId = args.getString(BundleKeys.KEY_ROOM_ID, "");
|
roomId = args.getString(BundleKeys.KEY_ROOM_ID, "");
|
||||||
roomToken = args.getString(BundleKeys.KEY_ROOM_TOKEN, "");
|
roomToken = args.getString(BundleKeys.KEY_ROOM_TOKEN, "");
|
||||||
conversationUser = args.getParcelable(BundleKeys.KEY_USER_ENTITY);
|
conversationUser = args.getParcelable(BundleKeys.KEY_USER_ENTITY);
|
||||||
|
conversationPassword = args.getString(BundleKeys.KEY_CONVERSATION_PASSWORD, "");
|
||||||
if (conversationUser == null) {
|
|
||||||
conversationUser = userUtils.getCurrentUser();
|
|
||||||
}
|
|
||||||
|
|
||||||
credentials = ApiUtils.getCredentials(conversationUser.getUsername(), conversationUser.getToken());
|
|
||||||
isVoiceOnlyCall = args.getBoolean(BundleKeys.KEY_CALL_VOICE_ONLY, false);
|
isVoiceOnlyCall = args.getBoolean(BundleKeys.KEY_CALL_VOICE_ONLY, false);
|
||||||
|
|
||||||
if (conversationUser.getUserId().equals("?")) {
|
if (conversationUser.getUserId().equals("?")) {
|
||||||
credentials = null;
|
credentials = null;
|
||||||
|
} else {
|
||||||
|
credentials = ApiUtils.getCredentials(conversationUser.getUsername(), conversationUser.getToken());
|
||||||
}
|
}
|
||||||
|
|
||||||
baseUrl = args.getString(BundleKeys.KEY_MODIFIED_BASE_URL, "");
|
baseUrl = args.getString(BundleKeys.KEY_MODIFIED_BASE_URL, "");
|
||||||
@ -994,7 +992,8 @@ public class CallController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void joinRoomAndCall() {
|
private void joinRoomAndCall() {
|
||||||
ncApi.joinRoom(credentials, ApiUtils.getUrlForSettingMyselfAsActiveParticipant(baseUrl, roomToken), null)
|
ncApi.joinRoom(credentials, ApiUtils.getUrlForSettingMyselfAsActiveParticipant(baseUrl,
|
||||||
|
roomToken), conversationPassword)
|
||||||
.subscribeOn(Schedulers.newThread())
|
.subscribeOn(Schedulers.newThread())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.retry(3)
|
.retry(3)
|
||||||
|
Loading…
Reference in New Issue
Block a user