Merge pull request #2438 from nextcloud/bugfix/noid/fixPermissionsForCallNotificationActivity

set participantPermissions in CallNotificationActivity
This commit is contained in:
Tim Krüger 2022-09-29 09:31:40 +02:00 committed by GitHub
commit 309ba90197
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,6 +57,7 @@ import com.nextcloud.talk.utils.ApiUtils;
import com.nextcloud.talk.utils.DisplayUtils;
import com.nextcloud.talk.utils.DoNotDisturbUtils;
import com.nextcloud.talk.utils.NotificationUtils;
import com.nextcloud.talk.utils.ParticipantPermissions;
import com.nextcloud.talk.utils.bundle.BundleKeys;
import com.nextcloud.talk.utils.database.user.CapabilitiesUtilNew;
import com.nextcloud.talk.utils.preferences.AppPreferences;
@ -205,6 +206,14 @@ public class CallNotificationActivity extends CallBaseActivity {
originalBundle.putString(BundleKeys.KEY_ROOM_TOKEN, currentConversation.getToken());
originalBundle.putString(BundleKeys.KEY_CONVERSATION_NAME, currentConversation.getDisplayName());
ParticipantPermissions participantPermission = new ParticipantPermissions(userBeingCalled, currentConversation);
originalBundle.putBoolean(
BundleKeys.KEY_PARTICIPANT_PERMISSION_CAN_PUBLISH_AUDIO,
participantPermission.canPublishAudio());
originalBundle.putBoolean(
BundleKeys.KEY_PARTICIPANT_PERMISSION_CAN_PUBLISH_VIDEO,
participantPermission.canPublishVideo());
Intent intent = new Intent(this, CallActivity.class);
intent.putExtras(originalBundle);
startActivity(intent);