From e4685ad47a964503f1de00e9945fb133f4201e5c Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 17 Feb 2020 11:10:41 +0100 Subject: [PATCH] hide local part of group chat xmpp address --- .../siacs/conversations/ui/ConferenceDetailsActivity.java | 8 ++++++-- src/main/res/values/strings.xml | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java index f3f4ded42..abfae615b 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java @@ -454,7 +454,11 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers setTitle(mucOptions.isPrivateAndNonAnonymous() ? R.string.action_muc_details : R.string.channel_details); this.binding.editMucNameButton.setVisibility((self.getAffiliation().ranks(MucOptions.Affiliation.OWNER) || mucOptions.canChangeSubject()) ? View.VISIBLE : View.GONE); this.binding.detailsAccount.setText(getString(R.string.using_account, account)); - this.binding.jid.setText(mConversation.getJid().asBareJid().toEscapedString()); + if (mConversation.isPrivateAndNonAnonymous()) { + this.binding.jid.setText(getString(R.string.hosted_on, mConversation.getJid().getDomain())); + } else { + this.binding.jid.setText(mConversation.getJid().asBareJid().toEscapedString()); + } AvatarWorkerTask.loadAvatar(mConversation, binding.yourPhoto, R.dimen.avatar_on_details_screen_size); String roomName = mucOptions.getName(); String subject = mucOptions.getSubject(); @@ -490,7 +494,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers this.binding.mucRole.setText(getStatus(self)); if (mucOptions.getSelf().getAffiliation().ranks(MucOptions.Affiliation.OWNER)) { this.binding.mucSettings.setVisibility(View.VISIBLE); - this.binding.mucConferenceType.setText(MucConfiguration.describe(this,mucOptions)); + this.binding.mucConferenceType.setText(MucConfiguration.describe(this, mucOptions)); } else if (!mucOptions.isPrivateAndNonAnonymous() && mucOptions.nonanonymous()) { this.binding.mucSettings.setVisibility(View.VISIBLE); this.binding.mucConferenceType.setText(R.string.group_chat_will_make_your_jabber_id_public); diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index f0936412e..a6c61e8d8 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -292,6 +292,7 @@ The group chat was shut down You are no longer in this group chat using account %s + hosted on %s Checking %s on HTTP host You are not connected. Try again later Check %s size