mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-22 13:05:31 +03:00
Merge pull request #1876 from nextcloud/bugfix/1853/fixQueryMap
Bugfix/1853/fix query map
This commit is contained in:
commit
5472097279
5 changed files with 24 additions and 8 deletions
|
@ -280,8 +280,7 @@ class MagicFirebaseMessagingService : FirebaseMessagingService() {
|
|||
apiVersion,
|
||||
signatureVerification.userEntity.baseUrl,
|
||||
decryptedPushMessage.id
|
||||
),
|
||||
null
|
||||
)
|
||||
)
|
||||
.repeatWhen { completed ->
|
||||
completed.zipWith(Observable.range(1, OBSERVABLE_COUNT), { _, i -> i })
|
||||
|
|
|
@ -1787,7 +1787,12 @@ public class CallActivity extends CallBaseActivity {
|
|||
Log.d(TAG, "getPeersForCall");
|
||||
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())
|
||||
.subscribe(new Observer<ParticipantsOverall>() {
|
||||
@Override
|
||||
|
|
|
@ -214,8 +214,12 @@ public class CallNotificationActivity extends CallBaseActivity {
|
|||
private void checkIfAnyParticipantsRemainInRoom() {
|
||||
int apiVersion = ApiUtils.getCallApiVersion(userBeingCalled, new int[]{ApiUtils.APIv4, 1});
|
||||
|
||||
ncApi.getPeersForCall(credentials, ApiUtils.getUrlForCall(apiVersion, userBeingCalled.getBaseUrl(),
|
||||
currentConversation.getToken()), null)
|
||||
ncApi.getPeersForCall(
|
||||
credentials,
|
||||
ApiUtils.getUrlForCall(
|
||||
apiVersion,
|
||||
userBeingCalled.getBaseUrl(),
|
||||
currentConversation.getToken()))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.repeatWhen(completed -> completed.zipWith(Observable.range(1, 12), (n, i) -> i)
|
||||
.flatMap(retryCount -> Observable.timer(5, TimeUnit.SECONDS))
|
||||
|
@ -250,7 +254,7 @@ public class CallNotificationActivity extends CallBaseActivity {
|
|||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
|
||||
Log.e(TAG, "error while getPeersForCall", e);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -186,9 +186,12 @@ public interface NcApi {
|
|||
/*
|
||||
Server URL is: baseUrl + ocsApiVersion + spreedApiVersion + /call/callToken
|
||||
*/
|
||||
@GET
|
||||
Observable<ParticipantsOverall> getPeersForCall(@Header("Authorization") String authorization, @Url String url);
|
||||
|
||||
@GET
|
||||
Observable<ParticipantsOverall> getPeersForCall(@Header("Authorization") String authorization, @Url String url,
|
||||
@QueryMap Map<String, Boolean> fields);
|
||||
@QueryMap Map<String, Boolean> fields);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST
|
||||
|
|
|
@ -438,7 +438,12 @@ class ConversationInfoController(args: Bundle) :
|
|||
|
||||
ncApi?.getPeersForCall(
|
||||
credentials,
|
||||
ApiUtils.getUrlForParticipants(apiVersion, conversationUser!!.baseUrl, conversationToken), fieldMap
|
||||
ApiUtils.getUrlForParticipants(
|
||||
apiVersion,
|
||||
conversationUser!!.baseUrl,
|
||||
conversationToken
|
||||
),
|
||||
fieldMap
|
||||
)
|
||||
?.subscribeOn(Schedulers.io())
|
||||
?.observeOn(AndroidSchedulers.mainThread())
|
||||
|
|
Loading…
Reference in a new issue