Add nickname for guest

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2018-01-26 12:26:27 +01:00
parent 23a8e7a982
commit 5ec60f21c9
2 changed files with 6 additions and 2 deletions

View file

@ -21,11 +21,14 @@
package com.nextcloud.talk.webrtc; package com.nextcloud.talk.webrtc;
import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import com.bluelinelabs.logansquare.LoganSquare; 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.DataChannelMessage;
import com.nextcloud.talk.api.models.json.signaling.NCIceCandidate; 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.MediaStreamEvent;
import com.nextcloud.talk.events.PeerConnectionEvent; import com.nextcloud.talk.events.PeerConnectionEvent;
import com.nextcloud.talk.events.SessionDescriptionSendEvent; import com.nextcloud.talk.events.SessionDescriptionSendEvent;
@ -157,10 +160,10 @@ public class MagicPeerConnectionWrapper {
} }
public String getNick() { public String getNick() {
if (nick != null) { if (!TextUtils.isEmpty(nick)) {
return nick; return nick;
} else { } else {
return ""; return NextcloudTalkApplication.getSharedApplication().getString(R.string.nc_nick_guest);
} }
} }

View file

@ -97,6 +97,7 @@
<!-- Call --> <!-- Call -->
<string name="nc_incoming_call">Incoming call</string> <string name="nc_incoming_call">Incoming call</string>
<string name="nc_nick_guest">Guest</string>
<!-- Notification channels --> <!-- Notification channels -->
<string name="nc_notification_channel">%1$s on %2$s notification channel</string> <string name="nc_notification_channel">%1$s on %2$s notification channel</string>