mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-10 08:00:57 +00:00
Fix joining a call
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
335afb03dd
commit
dde79b5671
@ -2044,11 +2044,11 @@ public class CallController extends BaseController {
|
||||
nick = getPeerConnectionWrapperForSessionIdAndType(session, videoStreamType, false).getNick();
|
||||
}
|
||||
|
||||
String userId;
|
||||
String userId = "";
|
||||
if (hasMCU) {
|
||||
userId = webSocketClient.getUserIdForSession(session);
|
||||
} else {
|
||||
userId = participantMap.get(session).getUserId();
|
||||
} else if (participantMap.get(session).getActorType() == Participant.ActorType.USERS) {
|
||||
userId = participantMap.get(session).getActorId();
|
||||
}
|
||||
|
||||
String urlForAvatar;
|
||||
|
@ -399,16 +399,22 @@ public class MagicWebSocketInstance extends WebSocketListener {
|
||||
}
|
||||
|
||||
public String getDisplayNameForSession(String session) {
|
||||
if (usersHashMap.containsKey(session)) {
|
||||
return usersHashMap.get(session).getDisplayName();
|
||||
Participant participant = usersHashMap.get(session);
|
||||
if (participant != null) {
|
||||
if (participant.getDisplayName() != null) {
|
||||
return participant.getDisplayName();
|
||||
}
|
||||
}
|
||||
|
||||
return NextcloudTalkApplication.Companion.getSharedApplication().getString(R.string.nc_nick_guest);
|
||||
}
|
||||
|
||||
public String getUserIdForSession(String session) {
|
||||
if (usersHashMap.containsKey(session)) {
|
||||
return usersHashMap.get(session).getUserId();
|
||||
Participant participant = usersHashMap.get(session);
|
||||
if (participant != null) {
|
||||
if (participant.getActorType() == Participant.ActorType.USERS) {
|
||||
return participant.getActorId();
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
|
Loading…
Reference in New Issue
Block a user