mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 22:29:09 +00:00
Hide call recording participant
<dev@mhibbe.de> Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
28d413c17b
commit
f9fdb387a5
@ -2081,6 +2081,10 @@ public class CallActivity extends CallBaseActivity {
|
||||
callParticipants.get(sessionId).setUserId(userId);
|
||||
}
|
||||
|
||||
if (participant.getInternal() != null) {
|
||||
callParticipants.get(sessionId).setInternal(participant.getInternal());
|
||||
}
|
||||
|
||||
String nick;
|
||||
if (hasExternalSignalingServer) {
|
||||
nick = webSocketClient.getDisplayNameForSession(sessionId);
|
||||
@ -2440,6 +2444,10 @@ public class CallActivity extends CallBaseActivity {
|
||||
}
|
||||
|
||||
private void addParticipantDisplayItem(CallParticipantModel callParticipantModel, String videoStreamType) {
|
||||
if (callParticipantModel.isInternal() != null && callParticipantModel.isInternal()) {
|
||||
return;
|
||||
}
|
||||
|
||||
String defaultGuestNick = getResources().getString(R.string.nc_nick_guest);
|
||||
|
||||
ParticipantDisplayItem participantDisplayItem = new ParticipantDisplayItem(baseUrl,
|
||||
|
@ -148,6 +148,10 @@ public class CallParticipant {
|
||||
callParticipantModel.setNick(nick);
|
||||
}
|
||||
|
||||
public void setInternal(Boolean internal) {
|
||||
callParticipantModel.setInternal(internal);
|
||||
}
|
||||
|
||||
public void setPeerConnectionWrapper(PeerConnectionWrapper peerConnectionWrapper) {
|
||||
if (this.peerConnectionWrapper != null) {
|
||||
this.peerConnectionWrapper.removeObserver(peerConnectionObserver);
|
||||
|
@ -132,6 +132,7 @@ public class CallParticipantList {
|
||||
private Participant copyParticipant(Participant participant) {
|
||||
Participant copiedParticipant = new Participant();
|
||||
copiedParticipant.setInCall(participant.getInCall());
|
||||
copiedParticipant.setInternal(participant.getInternal());
|
||||
copiedParticipant.setLastPing(participant.getLastPing());
|
||||
copiedParticipant.setSessionId(participant.getSessionId());
|
||||
copiedParticipant.setType(participant.getType());
|
||||
|
@ -75,6 +75,8 @@ public class CallParticipantModel {
|
||||
protected Data<String> userId;
|
||||
protected Data<String> nick;
|
||||
|
||||
protected Data<Boolean> internal;
|
||||
|
||||
protected Data<RaisedHand> raisedHand;
|
||||
|
||||
protected Data<PeerConnection.IceConnectionState> iceConnectionState;
|
||||
@ -91,6 +93,8 @@ public class CallParticipantModel {
|
||||
this.userId = new Data<>();
|
||||
this.nick = new Data<>();
|
||||
|
||||
this.internal = new Data<>();
|
||||
|
||||
this.raisedHand = new Data<>();
|
||||
|
||||
this.iceConnectionState = new Data<>();
|
||||
@ -114,6 +118,10 @@ public class CallParticipantModel {
|
||||
return nick.getValue();
|
||||
}
|
||||
|
||||
public Boolean isInternal() {
|
||||
return internal.getValue();
|
||||
}
|
||||
|
||||
public RaisedHand getRaisedHand() {
|
||||
return raisedHand.getValue();
|
||||
}
|
||||
|
@ -41,6 +41,10 @@ public class MutableCallParticipantModel extends CallParticipantModel {
|
||||
this.nick.setValue(nick);
|
||||
}
|
||||
|
||||
public void setInternal(Boolean internal) {
|
||||
this.internal.setValue(internal);
|
||||
}
|
||||
|
||||
public void setRaisedHand(boolean state, long timestamp) {
|
||||
this.raisedHand.setValue(new RaisedHand(state, timestamp));
|
||||
}
|
||||
|
@ -27,7 +27,6 @@ import com.bluelinelabs.logansquare.annotation.JsonObject
|
||||
import com.nextcloud.talk.models.json.converters.EnumActorTypeConverter
|
||||
import com.nextcloud.talk.models.json.converters.EnumParticipantTypeConverter
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import java.util.ArrayList
|
||||
|
||||
@Parcelize
|
||||
@JsonObject
|
||||
@ -48,6 +47,9 @@ data class Participant(
|
||||
@JsonField(name = ["userId"])
|
||||
var userId: String? = null,
|
||||
|
||||
@JsonField(name = ["internal"])
|
||||
var internal: Boolean? = null,
|
||||
|
||||
@JsonField(name = ["type", "participantType"], typeConverter = EnumParticipantTypeConverter::class)
|
||||
var type: ParticipantType? = null,
|
||||
|
||||
@ -90,7 +92,7 @@ data class Participant(
|
||||
) : Parcelable {
|
||||
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
|
||||
constructor() : this(
|
||||
null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null,
|
||||
0, null, ArrayList(0), 0, 0, null,
|
||||
null, null
|
||||
)
|
||||
|
@ -389,6 +389,7 @@ public abstract class SignalingMessageReceiver {
|
||||
// "participantType": #INTEGER#,
|
||||
// "userId": #STRING#, // Optional
|
||||
// "nextcloudSessionId": #STRING#, // Optional
|
||||
// "internal": #BOOLEAN#, // Optional
|
||||
// "participantPermissions": #INTEGER#, // Talk >= 13
|
||||
// },
|
||||
// ...
|
||||
@ -480,6 +481,10 @@ public abstract class SignalingMessageReceiver {
|
||||
participant.setUserId(participantMap.get("userId").toString());
|
||||
}
|
||||
|
||||
if (participantMap.get("internal") != null && Boolean.parseBoolean(participantMap.get("internal").toString())) {
|
||||
participant.setInternal(Boolean.TRUE);
|
||||
}
|
||||
|
||||
// Only in external signaling messages
|
||||
if (participantMap.get("participantType") != null) {
|
||||
int participantTypeInt = Integer.parseInt(participantMap.get("participantType").toString());
|
||||
|
Loading…
Reference in New Issue
Block a user