mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
allow getPeersForCall without QueryMap
- null was not allowed for query map (led to Illegal Argument Exception which caused issue #1853) Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
5a90f999dc
commit
1b30a6ef62
@ -280,8 +280,7 @@ class MagicFirebaseMessagingService : FirebaseMessagingService() {
|
|||||||
apiVersion,
|
apiVersion,
|
||||||
signatureVerification.userEntity.baseUrl,
|
signatureVerification.userEntity.baseUrl,
|
||||||
decryptedPushMessage.id
|
decryptedPushMessage.id
|
||||||
),
|
)
|
||||||
null
|
|
||||||
)
|
)
|
||||||
.repeatWhen { completed ->
|
.repeatWhen { completed ->
|
||||||
completed.zipWith(Observable.range(1, OBSERVABLE_COUNT), { _, i -> i })
|
completed.zipWith(Observable.range(1, OBSERVABLE_COUNT), { _, i -> i })
|
||||||
|
@ -1787,7 +1787,12 @@ public class CallActivity extends CallBaseActivity {
|
|||||||
Log.d(TAG, "getPeersForCall");
|
Log.d(TAG, "getPeersForCall");
|
||||||
int apiVersion = ApiUtils.getCallApiVersion(conversationUser, new int[]{ApiUtils.APIv4, 1});
|
int apiVersion = ApiUtils.getCallApiVersion(conversationUser, new int[]{ApiUtils.APIv4, 1});
|
||||||
|
|
||||||
ncApi.getPeersForCall(credentials, ApiUtils.getUrlForCall(apiVersion, baseUrl, roomToken), null)
|
ncApi.getPeersForCall(
|
||||||
|
credentials,
|
||||||
|
ApiUtils.getUrlForCall(
|
||||||
|
apiVersion,
|
||||||
|
baseUrl,
|
||||||
|
roomToken))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.subscribe(new Observer<ParticipantsOverall>() {
|
.subscribe(new Observer<ParticipantsOverall>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -214,8 +214,12 @@ public class CallNotificationActivity extends CallBaseActivity {
|
|||||||
private void checkIfAnyParticipantsRemainInRoom() {
|
private void checkIfAnyParticipantsRemainInRoom() {
|
||||||
int apiVersion = ApiUtils.getCallApiVersion(userBeingCalled, new int[]{ApiUtils.APIv4, 1});
|
int apiVersion = ApiUtils.getCallApiVersion(userBeingCalled, new int[]{ApiUtils.APIv4, 1});
|
||||||
|
|
||||||
ncApi.getPeersForCall(credentials, ApiUtils.getUrlForCall(apiVersion, userBeingCalled.getBaseUrl(),
|
ncApi.getPeersForCall(
|
||||||
currentConversation.getToken()), null)
|
credentials,
|
||||||
|
ApiUtils.getUrlForCall(
|
||||||
|
apiVersion,
|
||||||
|
userBeingCalled.getBaseUrl(),
|
||||||
|
currentConversation.getToken()))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.repeatWhen(completed -> completed.zipWith(Observable.range(1, 12), (n, i) -> i)
|
.repeatWhen(completed -> completed.zipWith(Observable.range(1, 12), (n, i) -> i)
|
||||||
.flatMap(retryCount -> Observable.timer(5, TimeUnit.SECONDS))
|
.flatMap(retryCount -> Observable.timer(5, TimeUnit.SECONDS))
|
||||||
|
@ -186,6 +186,9 @@ public interface NcApi {
|
|||||||
/*
|
/*
|
||||||
Server URL is: baseUrl + ocsApiVersion + spreedApiVersion + /call/callToken
|
Server URL is: baseUrl + ocsApiVersion + spreedApiVersion + /call/callToken
|
||||||
*/
|
*/
|
||||||
|
@GET
|
||||||
|
Observable<ParticipantsOverall> getPeersForCall(@Header("Authorization") String authorization, @Url String url);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
Observable<ParticipantsOverall> getPeersForCall(@Header("Authorization") String authorization, @Url String url,
|
Observable<ParticipantsOverall> getPeersForCall(@Header("Authorization") String authorization, @Url String url,
|
||||||
@QueryMap Map<String, Boolean> fields);
|
@QueryMap Map<String, Boolean> fields);
|
||||||
|
@ -438,7 +438,12 @@ class ConversationInfoController(args: Bundle) :
|
|||||||
|
|
||||||
ncApi?.getPeersForCall(
|
ncApi?.getPeersForCall(
|
||||||
credentials,
|
credentials,
|
||||||
ApiUtils.getUrlForParticipants(apiVersion, conversationUser!!.baseUrl, conversationToken), fieldMap
|
ApiUtils.getUrlForParticipants(
|
||||||
|
apiVersion,
|
||||||
|
conversationUser!!.baseUrl,
|
||||||
|
conversationToken
|
||||||
|
),
|
||||||
|
fieldMap
|
||||||
)
|
)
|
||||||
?.subscribeOn(Schedulers.io())
|
?.subscribeOn(Schedulers.io())
|
||||||
?.observeOn(AndroidSchedulers.mainThread())
|
?.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
Loading…
Reference in New Issue
Block a user