kopia lustrzana https://github.com/ryukoposting/Signal-Android
Prevent starting 1:1 call with a group recipient.
rodzic
89df0a2c04
commit
f40ba0bf68
|
@ -8,6 +8,7 @@ import org.signal.ringrtc.CallManager;
|
||||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||||
import org.thoughtcrime.securesms.events.WebRtcViewModel;
|
import org.thoughtcrime.securesms.events.WebRtcViewModel;
|
||||||
import org.thoughtcrime.securesms.groups.GroupId;
|
import org.thoughtcrime.securesms.groups.GroupId;
|
||||||
|
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||||
import org.thoughtcrime.securesms.ringrtc.RemotePeer;
|
import org.thoughtcrime.securesms.ringrtc.RemotePeer;
|
||||||
import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceState;
|
import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceState;
|
||||||
import org.whispersystems.signalservice.api.messages.calls.OfferMessage;
|
import org.whispersystems.signalservice.api.messages.calls.OfferMessage;
|
||||||
|
@ -44,6 +45,12 @@ public class IdleActionProcessor extends WebRtcActionProcessor {
|
||||||
{
|
{
|
||||||
Log.i(TAG, "handleOutgoingCall():");
|
Log.i(TAG, "handleOutgoingCall():");
|
||||||
|
|
||||||
|
Recipient recipient = Recipient.resolved(remotePeer.getId());
|
||||||
|
if (recipient.isGroup()) {
|
||||||
|
Log.w(TAG, "Aborting attempt to start 1:1 call for group recipient: " + remotePeer.getId());
|
||||||
|
return currentState;
|
||||||
|
}
|
||||||
|
|
||||||
currentState = WebRtcVideoUtil.initializeVideo(context, webRtcInteractor.getCameraEventListener(), currentState);
|
currentState = WebRtcVideoUtil.initializeVideo(context, webRtcInteractor.getCameraEventListener(), currentState);
|
||||||
return beginCallDelegate.handleOutgoingCall(currentState, remotePeer, offerType);
|
return beginCallDelegate.handleOutgoingCall(currentState, remotePeer, offerType);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue