From 5ec60f21c9675feeefba22aef15c9c6a373d54e9 Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Fri, 26 Jan 2018 12:26:27 +0100 Subject: [PATCH] Add nickname for guest Signed-off-by: Mario Danic --- .../nextcloud/talk/webrtc/MagicPeerConnectionWrapper.java | 7 +++++-- app/src/main/res/values/strings.xml | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/webrtc/MagicPeerConnectionWrapper.java b/app/src/main/java/com/nextcloud/talk/webrtc/MagicPeerConnectionWrapper.java index d5c166baa..8cbff26ec 100644 --- a/app/src/main/java/com/nextcloud/talk/webrtc/MagicPeerConnectionWrapper.java +++ b/app/src/main/java/com/nextcloud/talk/webrtc/MagicPeerConnectionWrapper.java @@ -21,11 +21,14 @@ package com.nextcloud.talk.webrtc; +import android.text.TextUtils; import android.util.Log; import com.bluelinelabs.logansquare.LoganSquare; +import com.nextcloud.talk.R; import com.nextcloud.talk.api.models.json.signaling.DataChannelMessage; import com.nextcloud.talk.api.models.json.signaling.NCIceCandidate; +import com.nextcloud.talk.application.NextcloudTalkApplication; import com.nextcloud.talk.events.MediaStreamEvent; import com.nextcloud.talk.events.PeerConnectionEvent; import com.nextcloud.talk.events.SessionDescriptionSendEvent; @@ -157,10 +160,10 @@ public class MagicPeerConnectionWrapper { } public String getNick() { - if (nick != null) { + if (!TextUtils.isEmpty(nick)) { return nick; } else { - return ""; + return NextcloudTalkApplication.getSharedApplication().getString(R.string.nc_nick_guest); } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 408d2dc3a..2dd990bea 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -97,6 +97,7 @@ Incoming call + Guest %1$s on %2$s notification channel