Return empty display name rather than default nick from web socket

If the display name is not known whether "Guest" or something else needs
to be shown is not a responsibility of the web socket, so now an empty
string is returned instead.

In practice this should not make any difference, though, as the display
name of users is always known as soon as the user joined, and if the
nick of a guest is not known the UI will set it to "Guest".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2022-11-25 12:18:12 +01:00
parent 0dcdd6161f
commit 81f353f7f0

View file

@ -25,7 +25,6 @@ import android.text.TextUtils;
import android.util.Log;
import com.bluelinelabs.logansquare.LoganSquare;
import com.nextcloud.talk.R;
import com.nextcloud.talk.application.NextcloudTalkApplication;
import com.nextcloud.talk.data.user.model.User;
import com.nextcloud.talk.events.NetworkEvent;
@ -384,7 +383,7 @@ public class MagicWebSocketInstance extends WebSocketListener {
}
}
return NextcloudTalkApplication.Companion.getSharedApplication().getString(R.string.nc_nick_guest);
return "";
}
public String getUserIdForSession(String session) {