set participantPermissions in CallNotificationActivity

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2022-09-28 15:45:05 +02:00
parent e26a7a7beb
commit d09c5d4865
No known key found for this signature in database
GPG key ID: C793F8B59F43CE7B

View file

@ -57,6 +57,7 @@ import com.nextcloud.talk.utils.ApiUtils;
import com.nextcloud.talk.utils.DisplayUtils; import com.nextcloud.talk.utils.DisplayUtils;
import com.nextcloud.talk.utils.DoNotDisturbUtils; import com.nextcloud.talk.utils.DoNotDisturbUtils;
import com.nextcloud.talk.utils.NotificationUtils; import com.nextcloud.talk.utils.NotificationUtils;
import com.nextcloud.talk.utils.ParticipantPermissions;
import com.nextcloud.talk.utils.bundle.BundleKeys; import com.nextcloud.talk.utils.bundle.BundleKeys;
import com.nextcloud.talk.utils.database.user.CapabilitiesUtilNew; import com.nextcloud.talk.utils.database.user.CapabilitiesUtilNew;
import com.nextcloud.talk.utils.preferences.AppPreferences; 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_ROOM_TOKEN, currentConversation.getToken());
originalBundle.putString(BundleKeys.KEY_CONVERSATION_NAME, currentConversation.getDisplayName()); 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 intent = new Intent(this, CallActivity.class);
intent.putExtras(originalBundle); intent.putExtras(originalBundle);
startActivity(intent); startActivity(intent);