From b69ab65b128dc13273cda0f81cbfcee7cfc9d1e6 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 24 May 2016 13:26:30 +0200 Subject: show regitration failed try again later in UI --- .../eu/siacs/conversations/entities/Account.java | 5 ++++- .../eu/siacs/conversations/xmpp/XmppConnection.java | 21 ++++++++++++++------- src/main/res/values/strings.xml | 1 + 3 files changed, 19 insertions(+), 8 deletions(-) (limited to 'src/main') diff --git a/src/main/java/eu/siacs/conversations/entities/Account.java b/src/main/java/eu/siacs/conversations/entities/Account.java index a708b0ce8..2f573c896 100644 --- a/src/main/java/eu/siacs/conversations/entities/Account.java +++ b/src/main/java/eu/siacs/conversations/entities/Account.java @@ -99,7 +99,8 @@ public class Account extends AbstractEntity { INCOMPATIBLE_SERVER(true), TOR_NOT_AVAILABLE(true), BIND_FAILURE(true), - HOST_UNKNOWN(true); + HOST_UNKNOWN(true), + REGISTRATION_PLEASE_WAIT(true); private final boolean isError; @@ -149,6 +150,8 @@ public class Account extends AbstractEntity { return R.string.account_status_bind_failure; case HOST_UNKNOWN: return R.string.account_status_host_unknown; + case REGISTRATION_PLEASE_WAIT: + return R.string.registration_please_wait; default: return R.string.account_status_unknown; } diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index f75f027b6..9a8a55fbd 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -183,14 +183,21 @@ public class XmppConnection implements Runnable { account.setOption(Account.OPTION_REGISTER, false); forceCloseSocket(); changeStatus(Account.State.REGISTRATION_SUCCESSFUL); - } else if (packet.hasChild("error") - && (packet.findChild("error").hasChild("conflict"))) { - forceCloseSocket(); - changeStatus(Account.State.REGISTRATION_CONFLICT); } else { - forceCloseSocket(); - changeStatus(Account.State.REGISTRATION_FAILED); - Log.d(Config.LOGTAG, packet.toString()); + Element error = packet.findChild("error"); + if (error != null && error.hasChild("conflict")) { + forceCloseSocket(); + changeStatus(Account.State.REGISTRATION_CONFLICT); + } else if (error != null + && "wait".equals(error.getAttribute("type")) + && error.hasChild("resource-constraint")) { + forceCloseSocket(); + changeStatus(Account.State.REGISTRATION_PLEASE_WAIT); + } else { + forceCloseSocket(); + changeStatus(Account.State.REGISTRATION_FAILED); + Log.d(Config.LOGTAG, packet.toString()); + } } } }; diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index aa5f5a386..f50c3a70b 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -641,4 +641,5 @@ A secure password has been generated Your device does not support opting out of battery optimization Show password + Registration failed: Try again later -- cgit v1.2.3 From 79796b00799bd491dbdb7363919a52da9d27356c Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 25 May 2016 21:05:51 +0200 Subject: don't respond to otr messages in muc pms --- src/main/java/eu/siacs/conversations/parser/MessageParser.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main') diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index 31d132995..603edd31b 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -369,6 +369,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece if ((body != null || pgpEncrypted != null || axolotlEncrypted != null) && !isMucStatusMessage) { Conversation conversation = mXmppConnectionService.findOrCreateConversation(account, counterpart.toBareJid(), isTypeGroupChat, query); + final boolean conversationMultiMode = conversation.getMode() == Conversation.MODE_MULTI; if (isTypeGroupChat) { if (counterpart.getResourcepart().equals(conversation.getMucOptions().getActualNick())) { status = Message.STATUS_SEND_RECEIVED; @@ -388,7 +389,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece } Message message; if (body != null && body.startsWith("?OTR") && Config.supportOtr()) { - if (!isForwarded && !isTypeGroupChat && isProperlyAddressed) { + if (!isForwarded && !isTypeGroupChat && isProperlyAddressed && !conversationMultiMode) { message = parseOtrChat(body, from, remoteMsgId, conversation); if (message == null) { return; @@ -401,7 +402,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece message = new Message(conversation, pgpEncrypted, Message.ENCRYPTION_PGP, status); } else if (axolotlEncrypted != null && Config.supportOmemo()) { Jid origin; - if (conversation.getMode() == Conversation.MODE_MULTI) { + if (conversationMultiMode) { origin = conversation.getMucOptions().getTrueCounterpart(counterpart); if (origin == null) { Log.d(Config.LOGTAG,"axolotl message in non anonymous conference received"); @@ -429,7 +430,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece message.setTime(timestamp); message.setOob(isOob); message.markable = packet.hasChild("markable", "urn:xmpp:chat-markers:0"); - if (conversation.getMode() == Conversation.MODE_MULTI) { + if (conversationMultiMode) { Jid trueCounterpart = conversation.getMucOptions().getTrueCounterpart(counterpart); message.setTrueCounterpart(trueCounterpart); if (!isTypeGroupChat) { @@ -449,7 +450,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece || replacedMessage.getFingerprint().equals(message.getFingerprint()); final boolean trueCountersMatch = replacedMessage.getTrueCounterpart() != null && replacedMessage.getTrueCounterpart().equals(message.getTrueCounterpart()); - if (fingerprintsMatch && (trueCountersMatch || conversation.getMode() == Conversation.MODE_SINGLE)) { + if (fingerprintsMatch && (trueCountersMatch || !conversationMultiMode)) { Log.d(Config.LOGTAG, "replaced message '" + replacedMessage.getBody() + "' with '" + message.getBody() + "'"); final String uuid = replacedMessage.getUuid(); replacedMessage.setUuid(UUID.randomUUID().toString()); -- cgit v1.2.3 From c65c3148017a9d46e683458394f3b88a10745cda Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 25 May 2016 21:54:46 +0200 Subject: only subscribe to omemo pep events if omemo is enabled --- .../java/eu/siacs/conversations/generator/AbstractGenerator.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java b/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java index 4be6c6219..9e8396835 100644 --- a/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java +++ b/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java @@ -12,6 +12,7 @@ import java.util.List; import java.util.Locale; import java.util.TimeZone; +import eu.siacs.conversations.Config; import eu.siacs.conversations.crypto.axolotl.AxolotlService; import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.utils.PhoneHelper; @@ -32,8 +33,7 @@ public abstract class AbstractGenerator { "http://jabber.org/protocol/nick+notify", "urn:xmpp:ping", "jabber:iq:version", - "http://jabber.org/protocol/chatstates", - AxolotlService.PEP_DEVICE_LIST_NOTIFY}; + "http://jabber.org/protocol/chatstates"}; private final String[] MESSAGE_CONFIRMATION_FEATURES = { "urn:xmpp:chat-markers:0", "urn:xmpp:receipts" @@ -95,6 +95,9 @@ public abstract class AbstractGenerator { if (mXmppConnectionService.allowMessageCorrection()) { features.addAll(Arrays.asList(MESSAGE_CORRECTION_FEATURES)); } + if (Config.supportOmemo()) { + features.add(AxolotlService.PEP_DEVICE_LIST_NOTIFY); + } Collections.sort(features); return features; } -- cgit v1.2.3 From 5137837f6d99ea5c9cc2b1b50515f545da0f7b0f Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 25 May 2016 21:55:01 +0200 Subject: only publish keys if omemo is enabled --- .../java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java index aac814433..9e54c0c7d 100644 --- a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java +++ b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java @@ -75,7 +75,9 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded { @Override public void onAdvancedStreamFeaturesAvailable(Account account) { - if (account.getXmppConnection() != null && account.getXmppConnection().getFeatures().pep()) { + if (Config.supportOmemo() + && account.getXmppConnection() != null + && account.getXmppConnection().getFeatures().pep()) { publishBundlesIfNeeded(true, false); } else { Log.d(Config.LOGTAG,account.getJid().toBareJid()+": skipping OMEMO initialization"); -- cgit v1.2.3 From 83adbb6052104be0c5519e9a8312a1a780718442 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 25 May 2016 22:12:13 +0200 Subject: hide fingerprints in UI if encryption is disabled --- .../conversations/ui/ContactDetailsActivity.java | 56 ++++++++++++---------- .../conversations/ui/ConversationFragment.java | 7 ++- .../conversations/ui/EditAccountActivity.java | 17 ++++--- src/main/res/values/strings.xml | 1 + 4 files changed, 44 insertions(+), 37 deletions(-) (limited to 'src/main') diff --git a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java index f8f8fc590..de0979a60 100644 --- a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java @@ -390,35 +390,39 @@ public class ContactDetailsActivity extends XmppActivity implements OnAccountUpd keys.removeAllViews(); boolean hasKeys = false; LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); - for(final String otrFingerprint : contact.getOtrFingerprints()) { - hasKeys = true; - View view = inflater.inflate(R.layout.contact_key, keys, false); - TextView key = (TextView) view.findViewById(R.id.key); - TextView keyType = (TextView) view.findViewById(R.id.key_type); - ImageButton removeButton = (ImageButton) view - .findViewById(R.id.button_remove); - removeButton.setVisibility(View.VISIBLE); - keyType.setText("OTR Fingerprint"); - key.setText(CryptoHelper.prettifyFingerprint(otrFingerprint)); - keys.addView(view); - removeButton.setOnClickListener(new OnClickListener() { + if (Config.supportOtr()) { + for (final String otrFingerprint : contact.getOtrFingerprints()) { + hasKeys = true; + View view = inflater.inflate(R.layout.contact_key, keys, false); + TextView key = (TextView) view.findViewById(R.id.key); + TextView keyType = (TextView) view.findViewById(R.id.key_type); + ImageButton removeButton = (ImageButton) view + .findViewById(R.id.button_remove); + removeButton.setVisibility(View.VISIBLE); + keyType.setText("OTR Fingerprint"); + key.setText(CryptoHelper.prettifyFingerprint(otrFingerprint)); + keys.addView(view); + removeButton.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - confirmToDeleteFingerprint(otrFingerprint); - } - }); + @Override + public void onClick(View v) { + confirmToDeleteFingerprint(otrFingerprint); + } + }); + } } - for (final String fingerprint : contact.getAccount().getAxolotlService().getFingerprintsForContact(contact)) { - boolean highlight = fingerprint.equals(messageFingerprint); - hasKeys |= addFingerprintRow(keys, contact.getAccount(), fingerprint, highlight, new OnClickListener() { - @Override - public void onClick(View v) { - onOmemoKeyClicked(contact.getAccount(), fingerprint); - } - }); + if (Config.supportOmemo()) { + for (final String fingerprint : contact.getAccount().getAxolotlService().getFingerprintsForContact(contact)) { + boolean highlight = fingerprint.equals(messageFingerprint); + hasKeys |= addFingerprintRow(keys, contact.getAccount(), fingerprint, highlight, new OnClickListener() { + @Override + public void onClick(View v) { + onOmemoKeyClicked(contact.getAccount(), fingerprint); + } + }); + } } - if (contact.getPgpKeyId() != 0) { + if (Config.supportOpenPgp() && contact.getPgpKeyId() != 0) { hasKeys = true; View view = inflater.inflate(R.layout.contact_key, keys, false); TextView key = (TextView) view.findViewById(R.id.key); diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 60514d205..5d5e4c297 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -390,8 +390,11 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa } else { switch (conversation.getNextEncryption()) { case Message.ENCRYPTION_NONE: - mEditMessage - .setHint(getString(R.string.send_unencrypted_message)); + if (Config.multipleEncryptionChoices()) { + mEditMessage.setHint(getString(R.string.send_unencrypted_message)); + } else { + mEditMessage.setHint(getString(R.string.send_message_to_x,conversation.getName())); + } break; case Message.ENCRYPTION_OTR: mEditMessage.setHint(getString(R.string.send_otr_message)); diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java index 1ba7dd3d0..dbd820b2c 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -523,7 +523,7 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate } mamPrefs.setVisible(mAccount.getXmppConnection().getFeatures().mam()); Set otherDevices = mAccount.getAxolotlService().getOwnDeviceIds(); - if (otherDevices == null || otherDevices.isEmpty()) { + if (otherDevices == null || otherDevices.isEmpty() || Config.supportOmemo()) { clearDevices.setVisible(false); } changePresence.setVisible(manuallyChangePresence()); @@ -776,7 +776,7 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate this.mServerInfoPush.setText(R.string.server_info_unavailable); } final String otrFingerprint = this.mAccount.getOtrFingerprint(); - if (otrFingerprint != null) { + if (otrFingerprint != null && Config.supportOtr()) { this.mOtrFingerprintBox.setVisibility(View.VISIBLE); this.mOtrFingerprint.setText(CryptoHelper.prettifyFingerprint(otrFingerprint)); this.mOtrFingerprintToClipboardButton @@ -798,10 +798,10 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate } else { this.mOtrFingerprintBox.setVisibility(View.GONE); } - final String axolotlFingerprint = this.mAccount.getAxolotlService().getOwnFingerprint(); - if (axolotlFingerprint != null) { + final String ownAxolotlFingerprint = this.mAccount.getAxolotlService().getOwnFingerprint(); + if (ownAxolotlFingerprint != null && Config.supportOmemo()) { this.mAxolotlFingerprintBox.setVisibility(View.VISIBLE); - this.mAxolotlFingerprint.setText(CryptoHelper.prettifyFingerprint(axolotlFingerprint.substring(2))); + this.mAxolotlFingerprint.setText(CryptoHelper.prettifyFingerprint(ownAxolotlFingerprint.substring(2))); this.mAxolotlFingerprintToClipboardButton .setVisibility(View.VISIBLE); this.mAxolotlFingerprintToClipboardButton @@ -810,7 +810,7 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate @Override public void onClick(final View v) { - if (copyTextToClipboard(axolotlFingerprint.substring(2), R.string.omemo_fingerprint)) { + if (copyTextToClipboard(ownAxolotlFingerprint.substring(2), R.string.omemo_fingerprint)) { Toast.makeText( EditAccountActivity.this, R.string.toast_message_omemo_fingerprint, @@ -833,17 +833,16 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate } else { this.mAxolotlFingerprintBox.setVisibility(View.GONE); } - final String ownFingerprint = mAccount.getAxolotlService().getOwnFingerprint(); boolean hasKeys = false; keys.removeAllViews(); for (final String fingerprint : mAccount.getAxolotlService().getFingerprintsForOwnSessions()) { - if (ownFingerprint.equals(fingerprint)) { + if (ownAxolotlFingerprint.equals(fingerprint)) { continue; } boolean highlight = fingerprint.equals(messageFingerprint); hasKeys |= addFingerprintRow(keys, mAccount, fingerprint, highlight, null); } - if (hasKeys) { + if (hasKeys && Config.supportOmemo()) { keysCard.setVisibility(View.VISIBLE); } else { keysCard.setVisibility(View.GONE); diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index f50c3a70b..6c6a46f0b 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -81,6 +81,7 @@ End this conversation afterwards Choose presence to contact Send unencrypted message + Send message to %s Send OTR encrypted message Send OMEMO encrypted message Send v\\OMEMO encrypted message -- cgit v1.2.3 From c06e2787c7192bb450389f0b6352fae6fa1eeb61 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 25 May 2016 23:24:36 +0200 Subject: sending warning to receiving client if that client doesn't support omemo. fixes #1873 --- .../java/eu/siacs/conversations/crypto/OtrService.java | 2 +- .../eu/siacs/conversations/generator/MessageGenerator.java | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/eu/siacs/conversations/crypto/OtrService.java b/src/main/java/eu/siacs/conversations/crypto/OtrService.java index 1804704eb..af11756f6 100644 --- a/src/main/java/eu/siacs/conversations/crypto/OtrService.java +++ b/src/main/java/eu/siacs/conversations/crypto/OtrService.java @@ -122,7 +122,7 @@ public class OtrService extends OtrCryptoEngineImpl implements OtrEngineHost { @Override public String getFallbackMessage(SessionID arg0) { - return "I would like to start a private (OTR encrypted) conversation but your client doesn’t seem to support that"; + return MessageGenerator.OTR_FALLBACK_MESSAGE; } @Override diff --git a/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java b/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java index 0e7a8ce6e..823af397a 100644 --- a/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java +++ b/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java @@ -9,6 +9,7 @@ import java.util.Date; import java.util.Locale; import java.util.TimeZone; +import eu.siacs.conversations.crypto.axolotl.AxolotlService; import eu.siacs.conversations.crypto.axolotl.XmppAxolotlMessage; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Conversation; @@ -20,6 +21,10 @@ import eu.siacs.conversations.xmpp.jid.Jid; import eu.siacs.conversations.xmpp.stanzas.MessagePacket; public class MessageGenerator extends AbstractGenerator { + public static final String OTR_FALLBACK_MESSAGE = "I would like to start a private (OTR encrypted) conversation but your client doesn’t seem to support that"; + private static final String OMEMO_FALLBACK_MESSAGE = "I sent you an OMEMO encrypted message but your client doesn’t seem to support that. Find more information on https://conversations.im/omemo"; + private static final String PGP_FALLBACK_MESSAGE = "I sent you a PGP encrypted message but your client doesn’t seem to support that."; + public MessageGenerator(XmppConnectionService service) { super(service); } @@ -67,11 +72,18 @@ public class MessageGenerator extends AbstractGenerator { if (axolotlMessage == null) { return null; } + if (!recipientSupportsOmemo(message)) { + packet.setBody(OMEMO_FALLBACK_MESSAGE); + } packet.setAxolotlMessage(axolotlMessage.toElement()); packet.addChild("store", "urn:xmpp:hints"); return packet; } + private static boolean recipientSupportsOmemo(Message message) { + return message.getContact().getPresences().allOrNonSupport(AxolotlService.PEP_DEVICE_LIST_NOTIFY); + } + public static void addMessageHints(MessagePacket packet) { packet.addChild("private", "urn:xmpp:carbons:2"); packet.addChild("no-copy", "urn:xmpp:hints"); @@ -116,7 +128,7 @@ public class MessageGenerator extends AbstractGenerator { public MessagePacket generatePgpChat(Message message) { MessagePacket packet = preparePacket(message); - packet.setBody("This is an XEP-0027 encrypted message"); + packet.setBody(PGP_FALLBACK_MESSAGE); if (message.getEncryption() == Message.ENCRYPTION_DECRYPTED) { packet.addChild("x", "jabber:x:encrypted").setContent(message.getEncryptedBody()); } else if (message.getEncryption() == Message.ENCRYPTION_PGP) { -- cgit v1.2.3 From c4e82eb3f8efb75bba153337755cf53af7a8eb6d Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 26 May 2016 12:39:04 +0200 Subject: change hint in edit subject dialog --- src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java | 2 +- src/main/res/values/strings.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java index 541306ad3..f39883137 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java @@ -280,7 +280,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers case R.id.action_edit_subject: if (mConversation != null) { quickEdit(mConversation.getMucOptions().getSubject(), - R.string.action_edit_subject, + R.string.edit_subject_hint, this.onSubjectEdited); } break; diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 6c6a46f0b..8a1dc1b3c 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -250,6 +250,7 @@ This bookmark already exists You Edit conference subject + The subject of this conference Joining conference… Leave Contact added you to contact list -- cgit v1.2.3 From 841e718d6aaf335d5750170da181a6443c7c8048 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 26 May 2016 12:39:31 +0200 Subject: make newly created conferences private by default --- .../eu/siacs/conversations/entities/MucOptions.java | 1 + .../eu/siacs/conversations/generator/IqGenerator.java | 10 ++++++++++ .../eu/siacs/conversations/parser/PresenceParser.java | 10 ++++++++++ .../conversations/services/XmppConnectionService.java | 19 ++++++++++--------- .../java/eu/siacs/conversations/ui/XmppActivity.java | 2 +- 5 files changed, 32 insertions(+), 10 deletions(-) (limited to 'src/main') diff --git a/src/main/java/eu/siacs/conversations/entities/MucOptions.java b/src/main/java/eu/siacs/conversations/entities/MucOptions.java index 44d16cf23..68c1fb508 100644 --- a/src/main/java/eu/siacs/conversations/entities/MucOptions.java +++ b/src/main/java/eu/siacs/conversations/entities/MucOptions.java @@ -118,6 +118,7 @@ public class MucOptions { public static final String STATUS_CODE_ROOM_CONFIG_CHANGED = "104"; public static final String STATUS_CODE_SELF_PRESENCE = "110"; + public static final String STATUS_CODE_ROOM_CREATED = "201"; public static final String STATUS_CODE_BANNED = "301"; public static final String STATUS_CODE_CHANGED_NICK = "303"; public static final String STATUS_CODE_KICKED = "307"; diff --git a/src/main/java/eu/siacs/conversations/generator/IqGenerator.java b/src/main/java/eu/siacs/conversations/generator/IqGenerator.java index daacfe59e..2e441727c 100644 --- a/src/main/java/eu/siacs/conversations/generator/IqGenerator.java +++ b/src/main/java/eu/siacs/conversations/generator/IqGenerator.java @@ -1,6 +1,7 @@ package eu.siacs.conversations.generator; +import android.os.Bundle; import android.util.Base64; import android.util.Log; @@ -343,4 +344,13 @@ public class IqGenerator extends AbstractGenerator { packet.query("http://jabber.org/protocol/muc#admin").addChild("item").setAttribute("affiliation",affiliation); return packet; } + + public static Bundle defaultRoomConfiguration() { + Bundle options = new Bundle(); + options.putString("muc#roomconfig_persistentroom", "1"); + options.putString("muc#roomconfig_membersonly", "1"); + options.putString("muc#roomconfig_publicroom", "0"); + options.putString("muc#roomconfig_whois", "anyone"); + return options; + } } diff --git a/src/main/java/eu/siacs/conversations/parser/PresenceParser.java b/src/main/java/eu/siacs/conversations/parser/PresenceParser.java index 2a912a45a..edcd986ed 100644 --- a/src/main/java/eu/siacs/conversations/parser/PresenceParser.java +++ b/src/main/java/eu/siacs/conversations/parser/PresenceParser.java @@ -14,6 +14,7 @@ import eu.siacs.conversations.entities.Conversation; import eu.siacs.conversations.entities.Message; import eu.siacs.conversations.entities.MucOptions; import eu.siacs.conversations.entities.Presence; +import eu.siacs.conversations.generator.IqGenerator; import eu.siacs.conversations.generator.PresenceGenerator; import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.xml.Element; @@ -77,6 +78,15 @@ public class PresenceParser extends AbstractParser implements } else { mucOptions.addUser(user); } + if (codes.contains(MucOptions.STATUS_CODE_ROOM_CREATED)) { + Log.d(Config.LOGTAG,mucOptions.getAccount().getJid().toBareJid() + +": room '" + +mucOptions.getConversation().getJid().toBareJid() + +"' created. pushing default configuration"); + mXmppConnectionService.pushConferenceConfiguration(mucOptions.getConversation(), + IqGenerator.defaultRoomConfiguration(), + null); + } if (mXmppConnectionService.getPgpEngine() != null) { Element signed = packet.findChild("x", "jabber:x:signed"); if (signed != null) { diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 09e5d1a9b..52a2fc221 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -2034,7 +2034,10 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa return null; } - public void createAdhocConference(final Account account, final Iterable jids, final UiCallback callback) { + public void createAdhocConference(final Account account, + final String subject, + final Iterable jids, + final UiCallback callback) { Log.d(Config.LOGTAG, account.getJid().toBareJid().toString() + ": creating adhoc conference with " + jids.toString()); if (account.getStatus() == Account.State.ONLINE) { try { @@ -2045,20 +2048,18 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa } return; } - String name = new BigInteger(75, getRNG()).toString(32); - Jid jid = Jid.fromParts(name, server, null); + String localpart = new BigInteger(75, getRNG()).toString(32); + Jid jid = Jid.fromParts(localpart, server, null); final Conversation conversation = findOrCreateConversation(account, jid, true); joinMuc(conversation, new OnConferenceJoined() { @Override public void onConferenceJoined(final Conversation conversation) { - Bundle options = new Bundle(); - options.putString("muc#roomconfig_persistentroom", "1"); - options.putString("muc#roomconfig_membersonly", "1"); - options.putString("muc#roomconfig_publicroom", "0"); - options.putString("muc#roomconfig_whois", "anyone"); - pushConferenceConfiguration(conversation, options, new OnConferenceOptionsPushed() { + pushConferenceConfiguration(conversation, IqGenerator.defaultRoomConfiguration(), new OnConferenceOptionsPushed() { @Override public void onPushSucceeded() { + if (subject != null && !subject.trim().isEmpty()) { + pushSubjectToConference(conversation, subject); + } for (Jid invite : jids) { invite(conversation, invite); } diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java index f1cf873ec..a136259d1 100644 --- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java @@ -1159,7 +1159,7 @@ public abstract class XmppActivity extends Activity { } } else { jids.add(conversation.getJid().toBareJid()); - service.createAdhocConference(conversation.getAccount(), jids, activity.adhocCallback); + service.createAdhocConference(conversation.getAccount(), null, jids, activity.adhocCallback); } } } -- cgit v1.2.3 From d9ff61ea2e2a54e7ac17f13b56016a75c04fc734 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 26 May 2016 22:37:00 +0200 Subject: show contact avatar in muc users unless that contact has its own avatar --- src/main/java/eu/siacs/conversations/services/AvatarService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/eu/siacs/conversations/services/AvatarService.java b/src/main/java/eu/siacs/conversations/services/AvatarService.java index 633758a5b..5a58660d4 100644 --- a/src/main/java/eu/siacs/conversations/services/AvatarService.java +++ b/src/main/java/eu/siacs/conversations/services/AvatarService.java @@ -64,7 +64,7 @@ public class AvatarService implements OnAdvancedStreamFeaturesLoaded { public Bitmap get(final MucOptions.User user, final int size, boolean cachedOnly) { Contact c = user.getContact(); - if (c != null && (c.getProfilePhoto() != null || c.getAvatar() != null)) { + if (c != null && (c.getProfilePhoto() != null || c.getAvatar() != null || user.getAvatar() == null)) { return get(c, size, cachedOnly); } else { return getImpl(user, size, cachedOnly); -- cgit v1.2.3 From 21ebb35e44ee2e6a6cffaffee737d537ab1b8d6b Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 26 May 2016 22:53:55 +0200 Subject: add 'create conference' dialog --- .../eu/siacs/conversations/entities/Bookmark.java | 5 +- .../services/XmppConnectionService.java | 23 +++- .../conversations/ui/ChooseContactActivity.java | 4 + .../ui/ConferenceDetailsActivity.java | 13 +-- .../ui/StartConversationActivity.java | 117 ++++++++++++++++++++- src/main/res/layout/create_conference_dialog.xml | 42 ++++++++ src/main/res/menu/start_conversation.xml | 14 ++- src/main/res/values/strings.xml | 5 + 8 files changed, 203 insertions(+), 20 deletions(-) create mode 100644 src/main/res/layout/create_conference_dialog.xml (limited to 'src/main') diff --git a/src/main/java/eu/siacs/conversations/entities/Bookmark.java b/src/main/java/eu/siacs/conversations/entities/Bookmark.java index fd6a5dab9..c5c4ff5dd 100644 --- a/src/main/java/eu/siacs/conversations/entities/Bookmark.java +++ b/src/main/java/eu/siacs/conversations/entities/Bookmark.java @@ -50,9 +50,8 @@ public class Bookmark extends Element implements ListItem { @Override public String getDisplayName() { - if (this.mJoinedConversation != null - && (this.mJoinedConversation.getMucOptions().getSubject() != null)) { - return this.mJoinedConversation.getMucOptions().getSubject(); + if (this.mJoinedConversation != null) { + return this.mJoinedConversation.getName(); } else if (getBookmarkName() != null) { return getBookmarkName(); } else { diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 52a2fc221..c05b78aa0 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -26,6 +26,7 @@ import android.os.SystemClock; import android.preference.PreferenceManager; import android.provider.ContactsContract; import android.security.KeyChain; +import android.util.Base64; import android.util.DisplayMetrics; import android.util.Log; import android.util.LruCache; @@ -2048,8 +2049,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa } return; } - String localpart = new BigInteger(75, getRNG()).toString(32); - Jid jid = Jid.fromParts(localpart, server, null); + final Jid jid = Jid.fromParts(new BigInteger(64, getRNG()).toString(Character.MAX_RADIX), server, null); final Conversation conversation = findOrCreateConversation(account, jid, true); joinMuc(conversation, new OnConferenceJoined() { @Override @@ -2058,7 +2058,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa @Override public void onPushSucceeded() { if (subject != null && !subject.trim().isEmpty()) { - pushSubjectToConference(conversation, subject); + pushSubjectToConference(conversation, subject.trim()); } for (Jid invite : jids) { invite(conversation, invite); @@ -2066,6 +2066,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa if (account.countPresences() > 1) { directInvite(conversation, account.getJid().toBareJid()); } + saveConversationAsBookmark(conversation, subject); if (callback != null) { callback.success(conversation); } @@ -2073,6 +2074,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa @Override public void onPushFailed() { + archiveConversation(conversation); if (callback != null) { callback.error(R.string.conference_creation_failed, conversation); } @@ -3306,6 +3308,21 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa return templates; } + public void saveConversationAsBookmark(Conversation conversation, String name) { + Account account = conversation.getAccount(); + Bookmark bookmark = new Bookmark(account, conversation.getJid().toBareJid()); + if (!conversation.getJid().isBareJid()) { + bookmark.setNick(conversation.getJid().getResourcepart()); + } + if (name != null && !name.trim().isEmpty()) { + bookmark.setBookmarkName(name.trim()); + } + bookmark.setAutojoin(getPreferences().getBoolean("autojoin",true)); + account.getBookmarks().add(bookmark); + pushBookmarks(account); + conversation.setBookmark(bookmark); + } + public interface OnMamPreferencesFetched { void onPreferencesFetched(Element prefs); void onPreferencesFetchFailed(); diff --git a/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java b/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java index 1698343b0..d930e2398 100644 --- a/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java @@ -77,6 +77,8 @@ public class ChooseContactActivity extends AbstractSearchableListItemActivity { String[] selection = getSelectedContactJids(); data.putExtra("contacts", selection); data.putExtra("multiple", true); + data.putExtra(EXTRA_ACCOUNT,request.getStringExtra(EXTRA_ACCOUNT)); + data.putExtra("subject", request.getStringExtra("subject")); setResult(RESULT_OK, data); finish(); return true; @@ -121,6 +123,7 @@ public class ChooseContactActivity extends AbstractSearchableListItemActivity { data.putExtra("conversation", request.getStringExtra("conversation")); data.putExtra("multiple", false); + data.putExtra("subject", request.getStringExtra("subject")); setResult(RESULT_OK, data); finish(); } @@ -194,6 +197,7 @@ public class ChooseContactActivity extends AbstractSearchableListItemActivity { data.putExtra("conversation", request.getStringExtra("conversation")); data.putExtra("multiple", false); + data.putExtra("subject", request.getStringExtra("subject")); setResult(RESULT_OK, data); finish(); diff --git a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java index f39883137..80ebb28b4 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java @@ -26,7 +26,6 @@ import org.openintents.openpgp.util.OpenPgpUtils; import java.util.ArrayList; import java.util.Collections; -import java.util.Comparator; import java.util.concurrent.atomic.AtomicInteger; import eu.siacs.conversations.Config; @@ -485,16 +484,8 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers } protected void saveAsBookmark() { - Account account = mConversation.getAccount(); - Bookmark bookmark = new Bookmark(account, mConversation.getJid().toBareJid()); - if (!mConversation.getJid().isBareJid()) { - bookmark.setNick(mConversation.getJid().getResourcepart()); - } - bookmark.setBookmarkName(mConversation.getMucOptions().getSubject()); - bookmark.setAutojoin(getPreferences().getBoolean("autojoin",true)); - account.getBookmarks().add(bookmark); - xmppConnectionService.pushBookmarks(account); - mConversation.setBookmark(bookmark); + xmppConnectionService.saveConversationAsBookmark(mConversation, + mConversation.getMucOptions().getSubject()); } protected void deleteBookmark() { diff --git a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java index 3ab6d1d2e..df7b24987 100644 --- a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java @@ -10,6 +10,7 @@ import android.app.AlertDialog; import android.app.Fragment; import android.app.FragmentTransaction; import android.app.ListFragment; +import android.app.PendingIntent; import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; @@ -27,6 +28,7 @@ import android.support.v4.view.ViewPager; import android.text.Editable; import android.text.TextWatcher; import android.util.Log; +import android.util.Pair; import android.view.ContextMenu; import android.view.ContextMenu.ContextMenuInfo; import android.view.KeyEvent; @@ -54,6 +56,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; +import java.util.concurrent.RunnableFuture; import java.util.concurrent.atomic.AtomicBoolean; import eu.siacs.conversations.Config; @@ -94,6 +97,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU private EditText mSearchEditText; private AtomicBoolean mRequestedContactsPermission = new AtomicBoolean(false); private final int REQUEST_SYNC_CONTACTS = 0x3b28cf; + private final int REQUEST_CREATE_CONFERENCE = 0x3b39da; private MenuItem.OnActionExpandListener mOnActionExpandListener = new MenuItem.OnActionExpandListener() { @@ -201,6 +205,47 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU } }; private String mInitialJid; + private Pair mPostponedActivityResult; + private UiCallback mAdhocConferenceCallback = new UiCallback() { + @Override + public void success(final Conversation conversation) { + runOnUiThread(new Runnable() { + @Override + public void run() { + hideToast(); + switchToConversation(conversation); + } + }); + } + + @Override + public void error(final int errorCode, Conversation object) { + runOnUiThread(new Runnable() { + @Override + public void run() { + replaceToast(getString(errorCode)); + } + }); + } + + @Override + public void userInputRequried(PendingIntent pi, Conversation object) { + + } + }; + private Toast mToast; + + protected void hideToast() { + if (mToast != null) { + mToast.cancel(); + } + } + + protected void replaceToast(String msg) { + hideToast(); + mToast = Toast.makeText(this, msg ,Toast.LENGTH_LONG); + mToast.show(); + } @Override public void onRosterUpdate() { @@ -488,6 +533,36 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU }); } + private void showCreateConferenceDialog() { + final AlertDialog.Builder builder = new AlertDialog.Builder(this); + builder.setTitle(R.string.create_conference); + final View dialogView = getLayoutInflater().inflate(R.layout.create_conference_dialog, null); + final Spinner spinner = (Spinner) dialogView.findViewById(R.id.account); + final EditText subject = (EditText) dialogView.findViewById(R.id.subject); + populateAccountSpinner(this, mActivatedAccounts, spinner); + builder.setView(dialogView); + builder.setPositiveButton(R.string.choose_participants, new OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + if (!xmppConnectionServiceBound) { + return; + } + final Account account = getSelectedAccount(spinner); + if (account == null) { + return; + } + Intent intent = new Intent(getApplicationContext(), ChooseContactActivity.class); + intent.putExtra("multiple", true); + intent.putExtra("show_enter_jid", true); + intent.putExtra("subject", subject.getText().toString()); + intent.putExtra(EXTRA_ACCOUNT, account.getJid().toBareJid().toString()); + startActivityForResult(intent, REQUEST_CREATE_CONFERENCE); + } + }); + builder.setNegativeButton(R.string.cancel, null); + builder.create().show(); + } + private Account getSelectedAccount(Spinner spinner) { if (!spinner.isEnabled()) { return null; @@ -532,7 +607,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.start_conversation, menu); MenuItem menuCreateContact = menu.findItem(R.id.action_create_contact); - MenuItem menuCreateConference = menu.findItem(R.id.action_join_conference); + MenuItem menuCreateConference = menu.findItem(R.id.action_conference); MenuItem menuHideOffline = menu.findItem(R.id.action_hide_offline); menuHideOffline.setChecked(this.mHideOfflineContacts); mMenuSearchView = menu.findItem(R.id.action_search); @@ -564,6 +639,9 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU case R.id.action_join_conference: showJoinConferenceDialog(null); return true; + case R.id.action_create_conference: + showCreateConferenceDialog(); + return true; case R.id.action_scan_qr_code: new IntentIntegrator(this).initiateScan(); return true; @@ -616,6 +694,39 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU this.mPendingInvite = null; } } + } else if (resultCode == RESULT_OK) { + if (xmppConnectionServiceBound) { + this.mPostponedActivityResult = null; + if (requestCode == REQUEST_CREATE_CONFERENCE) { + Log.d(Config.LOGTAG,"account jid: "+ intent.getStringExtra(EXTRA_ACCOUNT)); + Account account = extractAccount(intent); + final String subject = intent.getStringExtra("subject"); + List jids = new ArrayList<>(); + if (intent.getBooleanExtra("multiple", false)) { + String[] toAdd = intent.getStringArrayExtra("contacts"); + for (String item : toAdd) { + try { + jids.add(Jid.fromString(item)); + } catch (InvalidJidException e) { + //ignored + } + } + } else { + try { + jids.add(Jid.fromString(intent.getStringExtra("contact"))); + } catch (Exception e) { + //ignored + } + } + if (account != null && jids.size() > 1) { + xmppConnectionService.createAdhocConference(account, subject, jids, mAdhocConferenceCallback); + mToast = Toast.makeText(this, R.string.creating_conference,Toast.LENGTH_LONG); + mToast.show(); + } + } + } else { + this.mPostponedActivityResult = new Pair<>(requestCode, intent); + } } super.onActivityResult(requestCode, requestCode, intent); } @@ -657,6 +768,10 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU @Override protected void onBackendConnected() { + if (mPostponedActivityResult != null) { + onActivityResult(mPostponedActivityResult.first, RESULT_OK, mPostponedActivityResult.second); + this.mPostponedActivityResult = null; + } this.mActivatedAccounts.clear(); for (Account account : xmppConnectionService.getAccounts()) { if (account.getStatus() != Account.State.DISABLED) { diff --git a/src/main/res/layout/create_conference_dialog.xml b/src/main/res/layout/create_conference_dialog.xml new file mode 100644 index 000000000..cab2ac578 --- /dev/null +++ b/src/main/res/layout/create_conference_dialog.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/res/menu/start_conversation.xml b/src/main/res/menu/start_conversation.xml index a89d71ffd..327709fa1 100644 --- a/src/main/res/menu/start_conversation.xml +++ b/src/main/res/menu/start_conversation.xml @@ -13,10 +13,20 @@ android:showAsAction="always" android:title="@string/create_contact" /> + android:title="@string/join_or_create_conference"> + + + + + + Your device does not support opting out of battery optimization Show password Registration failed: Try again later + Create conference + Join or create conference + Subject + Choose participants + Creating conference… -- cgit v1.2.3 From 44833c1499caf41e6433d76a90fa42ab60a5dec1 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 27 May 2016 10:35:00 +0200 Subject: don't push default muc conf twice --- src/main/java/eu/siacs/conversations/entities/MucOptions.java | 10 ++++++++++ .../java/eu/siacs/conversations/parser/PresenceParser.java | 2 +- .../eu/siacs/conversations/services/XmppConnectionService.java | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/eu/siacs/conversations/entities/MucOptions.java b/src/main/java/eu/siacs/conversations/entities/MucOptions.java index 68c1fb508..d08483703 100644 --- a/src/main/java/eu/siacs/conversations/entities/MucOptions.java +++ b/src/main/java/eu/siacs/conversations/entities/MucOptions.java @@ -18,6 +18,8 @@ import eu.siacs.conversations.xmpp.pep.Avatar; @SuppressLint("DefaultLocale") public class MucOptions { + private boolean mAutoPushConfiguration = true; + public Account getAccount() { return this.conversation.getAccount(); } @@ -39,6 +41,14 @@ public class MucOptions { } } + public void flagNoAutoPushConfiguration() { + mAutoPushConfiguration = false; + } + + public boolean autoPushConfiguration() { + return mAutoPushConfiguration; + } + public enum Affiliation { OWNER("owner", 4, R.string.owner), ADMIN("admin", 3, R.string.admin), diff --git a/src/main/java/eu/siacs/conversations/parser/PresenceParser.java b/src/main/java/eu/siacs/conversations/parser/PresenceParser.java index edcd986ed..b5718b612 100644 --- a/src/main/java/eu/siacs/conversations/parser/PresenceParser.java +++ b/src/main/java/eu/siacs/conversations/parser/PresenceParser.java @@ -78,7 +78,7 @@ public class PresenceParser extends AbstractParser implements } else { mucOptions.addUser(user); } - if (codes.contains(MucOptions.STATUS_CODE_ROOM_CREATED)) { + if (codes.contains(MucOptions.STATUS_CODE_ROOM_CREATED) && mucOptions.autoPushConfiguration()) { Log.d(Config.LOGTAG,mucOptions.getAccount().getJid().toBareJid() +": room '" +mucOptions.getConversation().getJid().toBareJid() diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index c05b78aa0..b88ee7af2 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -1832,6 +1832,9 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa account.pendingConferenceLeaves.remove(conversation); if (account.getStatus() == Account.State.ONLINE) { conversation.resetMucOptions(); + if (onConferenceJoined != null) { + conversation.getMucOptions().flagNoAutoPushConfiguration(); + } conversation.setHasMessagesLeftOnServer(false); fetchConferenceConfiguration(conversation, new OnConferenceConfigurationFetched() { -- cgit v1.2.3 From f70fcc7bb8aa02374f664b95d44a9edc38bfdb39 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 27 May 2016 11:34:12 +0200 Subject: use first letter to draw tiles for avatars some users or conferences might have emojis in their names --- .../java/eu/siacs/conversations/services/AvatarService.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/eu/siacs/conversations/services/AvatarService.java b/src/main/java/eu/siacs/conversations/services/AvatarService.java index 5a58660d4..9e8e6970a 100644 --- a/src/main/java/eu/siacs/conversations/services/AvatarService.java +++ b/src/main/java/eu/siacs/conversations/services/AvatarService.java @@ -370,7 +370,7 @@ public class AvatarService implements OnAdvancedStreamFeaturesLoaded { private boolean drawTile(Canvas canvas, String name, int left, int top, int right, int bottom) { if (name != null) { - final String letter = name.isEmpty() ? "X" : name.substring(0, 1); + final String letter = getFirstLetter(name); final int color = UIHelper.getColorForName(name); drawTile(canvas, letter, color, left, top, right, bottom); return true; @@ -378,6 +378,15 @@ public class AvatarService implements OnAdvancedStreamFeaturesLoaded { return false; } + private static String getFirstLetter(String name) { + for(Character c : name.toCharArray()) { + if (Character.isLetterOrDigit(c)) { + return c.toString(); + } + } + return "X"; + } + private boolean drawTile(Canvas canvas, Uri uri, int left, int top, int right, int bottom) { if (uri != null) { Bitmap bitmap = mXmppConnectionService.getFileBackend() -- cgit v1.2.3 From a241ab66de50ad7fada548bdec1877b4b564f878 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 27 May 2016 19:17:57 +0200 Subject: use activity title 'choose participants' when doing that --- .../siacs/conversations/ui/ChooseContactActivity.java | 19 +++++++++++++++++++ .../conversations/ui/StartConversationActivity.java | 1 + 2 files changed, 20 insertions(+) (limited to 'src/main') diff --git a/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java b/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java index d930e2398..5156fcca4 100644 --- a/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java @@ -1,8 +1,10 @@ package eu.siacs.conversations.ui; +import android.app.ActionBar; import android.content.Context; import android.content.Intent; import android.os.Bundle; +import android.support.annotation.StringRes; import android.view.ActionMode; import android.view.Menu; import android.view.MenuInflater; @@ -32,6 +34,7 @@ public class ChooseContactActivity extends AbstractSearchableListItemActivity { private Set selected; private Set filterContacts; + public static final String EXTRA_TITLE_RES_ID = "extra_title_res_id"; @Override public void onCreate(final Bundle savedInstanceState) { @@ -131,6 +134,22 @@ public class ChooseContactActivity extends AbstractSearchableListItemActivity { } + @Override + public void onStart() { + super.onStart(); + Intent intent = getIntent(); + @StringRes + int res = intent != null ? intent.getIntExtra(EXTRA_TITLE_RES_ID,R.string.title_activity_choose_contact) : R.string.title_activity_choose_contact; + ActionBar bar = getActionBar(); + if (bar != null) { + try { + bar.setTitle(res); + } catch (Exception e) { + bar.setTitle(R.string.title_activity_choose_contact); + } + } + } + @Override public boolean onCreateOptionsMenu(final Menu menu) { super.onCreateOptionsMenu(menu); diff --git a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java index df7b24987..9af83edd8 100644 --- a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java @@ -556,6 +556,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU intent.putExtra("show_enter_jid", true); intent.putExtra("subject", subject.getText().toString()); intent.putExtra(EXTRA_ACCOUNT, account.getJid().toBareJid().toString()); + intent.putExtra(ChooseContactActivity.EXTRA_TITLE_RES_ID,R.string.choose_participants); startActivityForResult(intent, REQUEST_CREATE_CONFERENCE); } }); -- cgit v1.2.3 From 29bd1103c0546f601f203d7a0ca4c18550335f73 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 27 May 2016 20:05:40 +0200 Subject: refactored toasts shown when adhoc creating mucs --- .../conversations/ui/ConversationActivity.java | 2 ++ .../eu/siacs/conversations/ui/XmppActivity.java | 23 +++++++++++++++++++--- src/main/res/values/strings.xml | 3 +-- 3 files changed, 23 insertions(+), 5 deletions(-) (limited to 'src/main') diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java index c7fa2d288..a9b9beb72 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -1122,6 +1122,8 @@ public class ConversationActivity extends XmppActivity if (mPendingConferenceInvite != null) { mPendingConferenceInvite.execute(this); + mToast = Toast.makeText(this, R.string.creating_conference,Toast.LENGTH_LONG); + mToast.show(); mPendingConferenceInvite = null; } diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java index a136259d1..5dfa50832 100644 --- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java @@ -117,6 +117,20 @@ public abstract class XmppActivity extends Activity { protected int mTheme; protected boolean mUsingEnterKey = false; + protected Toast mToast; + + protected void hideToast() { + if (mToast != null) { + mToast.cancel(); + } + } + + protected void replaceToast(String msg) { + hideToast(); + mToast = Toast.makeText(this, msg ,Toast.LENGTH_LONG); + mToast.show(); + } + protected Runnable onOpenPGPKeyPublished = new Runnable() { @Override public void run() { @@ -940,19 +954,22 @@ public abstract class XmppActivity extends Activity { mPendingConferenceInvite = ConferenceInvite.parse(data); if (xmppConnectionServiceBound && mPendingConferenceInvite != null) { mPendingConferenceInvite.execute(this); + mToast = Toast.makeText(this, R.string.creating_conference,Toast.LENGTH_LONG); + mToast.show(); mPendingConferenceInvite = null; } } } + private UiCallback adhocCallback = new UiCallback() { @Override public void success(final Conversation conversation) { - switchToConversation(conversation); runOnUiThread(new Runnable() { @Override public void run() { - Toast.makeText(XmppActivity.this,R.string.conference_created,Toast.LENGTH_LONG).show(); + switchToConversation(conversation); + hideToast(); } }); } @@ -962,7 +979,7 @@ public abstract class XmppActivity extends Activity { runOnUiThread(new Runnable() { @Override public void run() { - Toast.makeText(XmppActivity.this,errorCode,Toast.LENGTH_LONG).show(); + replaceToast(getString(errorCode)); } }); } diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index da7a60984..0739d0eb2 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -412,8 +412,7 @@ Enable notifications Create conference with… No conference server found - Conference creation failed! - Conference created! + Conference creation failed!s Secret accepted! Reset Account avatar -- cgit v1.2.3 From 25f6651848b67d225967cf1bb35e037c998a5682 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 27 May 2016 20:07:39 +0200 Subject: pulled translations from transifex --- src/main/res/values-ar/strings.xml | 1 - src/main/res/values-bg/strings.xml | 6 +++-- src/main/res/values-ca/strings.xml | 1 - src/main/res/values-cs/strings.xml | 1 - src/main/res/values-de/strings.xml | 11 ++++---- src/main/res/values-el/strings.xml | 1 - src/main/res/values-es/strings.xml | 1 - src/main/res/values-eu/strings.xml | 1 - src/main/res/values-fr/strings.xml | 39 +++++++++++++++------------- src/main/res/values-id/strings.xml | 1 - src/main/res/values-it/strings.xml | 1 - src/main/res/values-iw/strings.xml | 1 - src/main/res/values-ja/strings.xml | 1 - src/main/res/values-ko/strings.xml | 1 - src/main/res/values-nb-rNO/strings.xml | 1 - src/main/res/values-nl/strings.xml | 4 ++- src/main/res/values-pl/strings.xml | 47 +++++++++++++++++++++++++++++++++- src/main/res/values-pt-rBR/strings.xml | 1 - src/main/res/values-pt/strings.xml | 1 - src/main/res/values-ro-rRO/strings.xml | 4 ++- src/main/res/values-ru/strings.xml | 1 - src/main/res/values-sk/strings.xml | 1 - src/main/res/values-sr/strings.xml | 1 - src/main/res/values-sv/strings.xml | 4 ++- src/main/res/values-tr-rTR/strings.xml | 1 - src/main/res/values-vi/strings.xml | 1 - src/main/res/values-zh-rCN/strings.xml | 1 - 27 files changed, 85 insertions(+), 50 deletions(-) (limited to 'src/main') diff --git a/src/main/res/values-ar/strings.xml b/src/main/res/values-ar/strings.xml index 25be4d61c..6b825007c 100644 --- a/src/main/res/values-ar/strings.xml +++ b/src/main/res/values-ar/strings.xml @@ -232,7 +232,6 @@ انشاء غرفة بــ سيرفر الغرف غير موجود فشل انشاء الغرفة - تم انشاء الرغرفة بنجاح الاجابة السريّة مقبولة إعادة تعيين الصورة الرمزية للحساب diff --git a/src/main/res/values-bg/strings.xml b/src/main/res/values-bg/strings.xml index 819250ba8..2f4dd15ac 100644 --- a/src/main/res/values-bg/strings.xml +++ b/src/main/res/values-bg/strings.xml @@ -379,7 +379,6 @@ Започване на беседа с… Не е открит сървър за беседата Неуспешно създаване на беседа! - Беседата беше създадена! Тайната е приета! Възстановяване Аватар на профила @@ -415,6 +414,7 @@ Деактивиране на всички профили Изпълнение на действието с Няма принадлежност + Извън линия Отхвърлен Член Разширен режим @@ -454,7 +454,7 @@ PDF документ Приложение за Андроид Контакт - Получи %s + Получихте %s Изключване на услугата на преден план Докоснете, за да отворите Conversations Аватарът беше публикуван! @@ -509,6 +509,7 @@ Показване на получените съобщения с черен текст на бял фон Мрежата на Тор е недостъпна Грешка при свързване + Сървърът е непознат Повредено Присъствие Отсъстващ, когато екранът е изключен @@ -605,4 +606,5 @@ Зает Беше създадена сигурна парола Устройството Ви не поддържа изключването на оптимизациите за използването на батерията + Показване на паролата diff --git a/src/main/res/values-ca/strings.xml b/src/main/res/values-ca/strings.xml index 37a3e0676..57787843c 100644 --- a/src/main/res/values-ca/strings.xml +++ b/src/main/res/values-ca/strings.xml @@ -321,7 +321,6 @@ Crear una conferència de conversació amb ... Servidor de la conferència de conversació no trobat la creació de la conferència de conversació ha fallat - Conferència de la conversació creada Aceptació del secret Reset Avatar del compte diff --git a/src/main/res/values-cs/strings.xml b/src/main/res/values-cs/strings.xml index 07cbde0d7..33d7669cc 100644 --- a/src/main/res/values-cs/strings.xml +++ b/src/main/res/values-cs/strings.xml @@ -379,7 +379,6 @@ Vytvořit konferenci s… Nebyl nalezen konferenční server Vytvoření konference selhalo! - Konference vytvořena! Tajemství souhlasí! Reset Avatar účtu diff --git a/src/main/res/values-de/strings.xml b/src/main/res/values-de/strings.xml index 278c9f651..7b6b4e0b7 100644 --- a/src/main/res/values-de/strings.xml +++ b/src/main/res/values-de/strings.xml @@ -166,8 +166,8 @@ Vorübergehend abschalten Avatar veröffentlichen Öffentlichen OpenPGP-Schlüssel veröffentlichen - Öffentlicher OpenPGP Schlüssel wurde veröffentlicht. - Deine öffentliche OpenPGP Schlüssel müssen veröffentlicht werden! + Öffentlicher OpenPGP-Schlüssel wurde veröffentlicht. + Deine öffentliche OpenPGP-Schlüssel müssen veröffentlicht werden! Konto aktivieren Bist du dir sicher? Wenn du dein Konto löschst, gehen alle Gesprächsverläufe verloren @@ -379,7 +379,6 @@ Konferenz erstellen mit… Kein Konferenz-Server gefunden Erstellen der Konferenz fehlgeschlagen! - Konferenz erstellt! Schlüssel akzeptiert! Zurücksetzen Konto-Avatar @@ -530,7 +529,7 @@ Archivierungseinstellungen werden abgerufen. Bitte warten … Archivierungseinstellungen konnten nicht abgerufen werden Captcha erforderlich - Gib den Text vom obigen Bild ein + Gib den Text von obigem Bild ein Zertifikat wird nicht vertraut Jabber-ID stimmt nicht dem Zertifikat überein Zertifikat erneuern @@ -590,7 +589,7 @@ Keine Anwendung zum Teilen der URI gefunden Teile URI mit… XMPP ist ein providerunabhängiges Protokoll. Du kannst diesen Klienten mit einem beliebigen XMPP-Server deiner Wahl nutzen.\nWir haben jedoch eine einfache Möglichkeit geschaffen, ein Konto auf conversations.im zu erstellen; ein Provider, der speziell für den Einsatz mit Conversations geeignet ist. - Wir führen dich durch den Prozess ein Konto auf conversations.im zu erstellen.\nWenn du conversations.im als Provider nutzt, kannst du mit Nutzern anderer Provider kommunizieren, indem du ihnen deine vollständige Jabber-ID gibst. + Wir führen dich durch den Prozess der Kontoerstellung auf conversations.im.\nWenn du conversations.im als Anbieter wählst, kannst du mit Nutzern anderer Anbieter kommunizieren, indem du ihnen deine vollständige Jabber-ID gibst. Deine vollständige Jabber ID lautet: %s Konto erstellen Nutze eigenen Provider @@ -606,6 +605,6 @@ Nicht verfügbar Beschäftigt Ein sicheres Passwort wurde erstellt - Dein Gerät unterstützt keine Batterieoptimierungen + Dein Gerät unterstützt kein Ausschalten der Batterieoptimierung Passwort anzeigen diff --git a/src/main/res/values-el/strings.xml b/src/main/res/values-el/strings.xml index da1872d1a..ad22c4516 100644 --- a/src/main/res/values-el/strings.xml +++ b/src/main/res/values-el/strings.xml @@ -321,7 +321,6 @@ Δημιουργία συνδιάσκεψης με... Δεν βρέθηκε διακομιστής συνδιάσκεψης Η δημιουργία συνδιάσκεψης απέτυχε! - Η συνδιάσκεψη δημιουργήθηκε! Το μυστικό έγινε δεκτό! Επαναφορά Εικόνα προφίλ λογαριασμού diff --git a/src/main/res/values-es/strings.xml b/src/main/res/values-es/strings.xml index 50c39fa39..7d0edaba2 100644 --- a/src/main/res/values-es/strings.xml +++ b/src/main/res/values-es/strings.xml @@ -379,7 +379,6 @@ Crear conversación en grupo No se ha encontrado el servidor para crear la conversación ¡La creación de la conversación ha fallado! - ¡Conversación en grupo creada! ¡Secreto aceptado! Reinicializar Imagen de perfil diff --git a/src/main/res/values-eu/strings.xml b/src/main/res/values-eu/strings.xml index 447d01086..1e2ad86a2 100644 --- a/src/main/res/values-eu/strings.xml +++ b/src/main/res/values-eu/strings.xml @@ -379,7 +379,6 @@ Konferentzia sortu honekin… Ez da konferentzia zerbitzaririk aurkitu Konferentzia sortzeak huts egin du! - Konferentzia sortu da! Sekretua onartu da! Berrezarri Kontuaren profileko argazkia diff --git a/src/main/res/values-fr/strings.xml b/src/main/res/values-fr/strings.xml index 8cfc8d21f..c9849b297 100644 --- a/src/main/res/values-fr/strings.xml +++ b/src/main/res/values-fr/strings.xml @@ -78,7 +78,7 @@ Voulez-vous supprimer tous les messages de cette conversation ?\n\nAttention : Les messages seront supprimés uniquement sur cet appareil. Supprimer les messages Fermer cette conversation ensuite - Choisir le statut de présence + Choisir la dispo. donnée au contact Envoyer un message non chiffré Envoyer un message chiffré avec OTR Envoyer un message chiffré avec OMEMO @@ -105,7 +105,7 @@ Accepter automatiquement les fichiers plus petits que… Pièce jointe Partage rapide - Ne pas ouvrir la conversation après avoir partagé quelque chose + Ne pas ouvrir la conversation après avoir partagé quelque chose depuis une autre application Notification Notifications Notifier lors de la réception d\'un message @@ -127,14 +127,14 @@ Erreur d\'E/S lors du déchiffrement du fichier Accepter Une erreur s\'est produite - Autoriser les màj de présence - Autoriser et demander par avance les mises à jour de présence des contacts ajoutés. + Autoriser les màj de disponibilité + Autoriser et demander par avance les mises à jour de disponibilité des contacts ajoutés. Publications Votre compte Clefs - Envoyer mes màj de présence - Recevoir ses màj de présence - Demander les màj de présence + Envoyer mes màj de disponibilité + Recevoir ses màj de disponibilité + Demander les màj de disponibilité Choisir une image Prendre une photo Accepter par avance les demandes de publication. @@ -255,7 +255,7 @@ %s a tout lu jusqu\'à ici Publier Toucher l\'avatar pour choisir une image depuis la galerie. - Note : toutes les personnes ayant souscrit à vos mises jour de présence verront cette image. + Note : toutes les personnes ayant souscrit à vos mises jour de disponibilité verront cette image. Mise à jour… Le serveur a rejeté votre publication Une erreur s\'est produite pendant la conversion de votre image. @@ -276,13 +276,13 @@ Activer La conférence nécessite un mot de passe Entrer le mot de passe - Mises à jour de présence manquantes pour ce contact - Veuillez demander à votre contact de partager ses mises à jour de présence.\n\nElles seront utilisées pour déterminer son client. + Mises à jour de disponibilité manquantes pour ce contact + Veuillez demander à votre contact de partager ses mises à jour de disponibilité.\n\nElles seront utilisées pour déterminer son client. Demander maintenant Supprimer l\'empreinte Êtes-vous sûr de vouloir supprimer l\'empreinte ? Ignorer - Attention : peut poser problème si l\'un des deux correspondants n\'a pas activé les mises à jour de présence.\n\nVérifiez dans les détails du contact que vous y avez bien souscrit. + Attention : peut poser problème si l\'un des deux correspondants n\'a pas activé les mises à jour de disponibilité.\n\nVérifiez dans les détails du contact que vous y avez bien souscrit. Sécurité Forcer le chiffrement de bout en bout Toujours envoyer des messages chiffrés (sauf pour les conférences) @@ -379,7 +379,6 @@ Créer une conférence avec… Aucun serveur de conférence disponible Échec de la création de la conférence ! - Conférence créée ! Secret accepté ! Réinitialiser Avatar du compte @@ -415,6 +414,7 @@ Désactiver tous les comptes Faire une action avec Aucune affiliation + Hors ligne Banni Membre Mode expert @@ -509,8 +509,9 @@ Afficher les messages reçus en texte noir sur fond blanc. Réseau Tor inaccessible La liaison a échoué + Hôte inconnu Détraqué - Présence + Disponibilité Absent quand l\'écran est éteint Marquer cette ressource comme absente quand l\'écran est éteint. Indisponible en mode silencieux @@ -586,17 +587,17 @@ Vous avez désactivé ce compte Erreur de sécurité : accès fichier non-valide Aucune application trouvée pour partager l\'URI - Partagée l\'URI avec... + Partager l\'URI avec... XMPP est un protocole indépendant. Vous pouvez utiliser ce client avec le serveur XMPP de votre choix.\nCependant, pour votre confort, vous pouvez créer un compte sur conversations.im, un fournisseur spécialement approprié pour Conversations. - Nous vous guiderons pendant toute la procédure de création d\'un compte utilisateur sur conversations.im.\nEn choisissant conversations.im comme fournisseur, vous pourrez communiquer avec les utilisateurs d\'autres fournisseurs en leurs transmettant votre Jabber ID complet. - Votre Jabber ID complet sera: %s + Nous vous guiderons pendant toute la procédure de création d\'un compte utilisateur sur conversations.im.\nEn choisissant conversations.im comme fournisseur, vous pourrez communiquer avec les utilisateurs d\'autres fournisseurs en leur transmettant votre Jabber ID complet. + Votre Jabber ID complet sera : %s Créer un compte Utiliser votre propre fournisseur Choisissez votre nom d\'utilisateur Changer votre disponibilité - Cliquez sur votre avatar pour modifier votre présence + Cliquez sur votre avatar pour modifier votre disponibilité Changer votre disponibilité - Message de status + Message de statut Configurer pour tous les comptes sur cet appareil Disponible En ligne @@ -604,4 +605,6 @@ Non disponible Occupé Un mot de passe fort a été généré + Les optimisations de batterie ne peuvent pas être désactivées sur votre appareil + Afficher le mot de passe diff --git a/src/main/res/values-id/strings.xml b/src/main/res/values-id/strings.xml index 8a76210dc..218f4dc20 100644 --- a/src/main/res/values-id/strings.xml +++ b/src/main/res/values-id/strings.xml @@ -333,7 +333,6 @@ Buat conference dengan... Tidak ada server conference ditemukan Pembuatan conference gagal! - Conference dibuat! Rahasia disetujui! Ulang Avatar akun diff --git a/src/main/res/values-it/strings.xml b/src/main/res/values-it/strings.xml index 38ecd281b..b77da3aa0 100644 --- a/src/main/res/values-it/strings.xml +++ b/src/main/res/values-it/strings.xml @@ -365,7 +365,6 @@ Crea conferenza con… Nessun server per conferenza trovato Creazione della conferenza fallita! - Conferenza creata! Segreto accettato! Reset Avatar utente diff --git a/src/main/res/values-iw/strings.xml b/src/main/res/values-iw/strings.xml index b4b6f6c52..a3eca4e61 100644 --- a/src/main/res/values-iw/strings.xml +++ b/src/main/res/values-iw/strings.xml @@ -341,7 +341,6 @@ צור ועידה עם... לא נמצא שרת ועידות יצירת הועידה נכשלה! - הועידה נוצרה! הסוד התקבל! איפוס תמונת פרופיל diff --git a/src/main/res/values-ja/strings.xml b/src/main/res/values-ja/strings.xml index 73400f89a..0a9cd2804 100644 --- a/src/main/res/values-ja/strings.xml +++ b/src/main/res/values-ja/strings.xml @@ -379,7 +379,6 @@ …と会議を作成 会議サーバーが見つかりません 会議の作成に失敗しました! - 会議を作成しました! 秘密を受取ました! リセット アカウント アバター diff --git a/src/main/res/values-ko/strings.xml b/src/main/res/values-ko/strings.xml index 5025fcda3..f675059f9 100644 --- a/src/main/res/values-ko/strings.xml +++ b/src/main/res/values-ko/strings.xml @@ -352,7 +352,6 @@ 회의 생성 회의 서버가 발견되지 않았습니다 회의 생성 실패 - 회의 생성됨 비밀 접수됨 초기화 계정 아바타 diff --git a/src/main/res/values-nb-rNO/strings.xml b/src/main/res/values-nb-rNO/strings.xml index 2753d0ce1..0eefc052b 100644 --- a/src/main/res/values-nb-rNO/strings.xml +++ b/src/main/res/values-nb-rNO/strings.xml @@ -352,7 +352,6 @@ Opprett konferanse med… Ingen konferanse-tjener funnet Opprettelse av konferanse feilet! - Konferanse opprettet! Hemmelighet godtatt! Tilbakestill Konto-avatar diff --git a/src/main/res/values-nl/strings.xml b/src/main/res/values-nl/strings.xml index 8c0b2effb..a55ab1298 100644 --- a/src/main/res/values-nl/strings.xml +++ b/src/main/res/values-nl/strings.xml @@ -379,7 +379,6 @@ Groepsgesprek aanmaken met… Geen groepsgespreksserver gevonden Aanmaken van groepsgesprek mislukt! - Groepsgesprek aangemaakt! Geheim aanvaard! Opnieuw instellen Account-avatar @@ -415,6 +414,7 @@ Alle accounts uitschakelen Actie uitvoeren met Geen aansluiting + Offline Verstoteling Lid Geavanceerde modus @@ -509,6 +509,7 @@ Toon ontvangen berichten als zwarte tekst op een witte achtergrond Tor-netwerk niet beschikbaar Bindingsfout + Onbekende host Gebroken Aanwezigheid Even weg wanneer scherm uit staat @@ -605,4 +606,5 @@ Bezig Een veilig wachtwoord is aangemaakt Je apparaat ondersteunt het uitschakelen van batterij-optimalisatie niet + Wachtwoord weergeven diff --git a/src/main/res/values-pl/strings.xml b/src/main/res/values-pl/strings.xml index 22114b9db..dbabd34a9 100644 --- a/src/main/res/values-pl/strings.xml +++ b/src/main/res/values-pl/strings.xml @@ -71,6 +71,8 @@ wysyłanie nie powiodło się odrzucono Przygotowywanie obrazu do wysłania + Przygotowywanie obrazów do wysłania + Udostępnianie plików. Proszę czekać... Wyczyść historię Wyczyść historię konwersacji Czy na pewno usunąć wszystkie wiadomości powiązane z konwersacją?\n\nUwaga: Działanie nie wpływa na wiadomości przechowywane na innych urządzeniach lub serwerach. @@ -101,10 +103,18 @@ Nazwa identyfikująca urządzenie Akceptuj pliki Automatycznie akceptuj pliki mniejsze niż... + Załączniki + Szybkie Udostępnianie + Po udostępnieniu obiektu natychmiastowo powróć do poprzedniej aktywności zamiast otwierać konwersację Powiadomienie Powiadomienia Powiadamiaj, gdy nadejdzie wiadomość Wibracje + Wibruj gdy nadejdzie wiadomość + Powiadomienie diodą LED + Migaj lampką powiadamiającą gdy nadejdzie wiadomość + Dzwonek + Odtwórz dźwięk gdy nadejdzie wiadomość Opóźnienie powiadomień Wyłącz powiadomienia przez krótki czas po otrzymaniu kopii wiadomości Zaawansowane @@ -156,6 +166,7 @@ Wyłącz tymczasowo Publikuj awatar Udostępnij klucz publiczny OpenPGP + Klucz publiczny OpenPGP został opublikowany. Włącz konto Czy na pewno? Wraz z kontem zostanie nieodwracalnie usunięta powiązana historia konwersacji. @@ -309,6 +320,7 @@ Sprawdzanie %s na hoście HTTP Brak połączenia. Spróbuj ponownie później Sprawdź rozmiar %s + Sprawdź wielkość %1$s na %2$s Opcje wiadomości Skopiuj tekst Skopiuj oryginalny URL @@ -347,6 +359,7 @@ Wybierz plik Odbieranie %1$s (ukończono %2$d%%) Pobierz %s + Usuń %s plik Otwórz %s Wysyłanie (ukończono %1$d%%) @@ -365,7 +378,6 @@ Utwórz konferencję... Nie odnaleziono serwera konferencji Nie udało się utworzyć konferencji! - Konferencja została utworzona! Sekret został zaakceptowany! Resetuj Awatar konta @@ -429,6 +441,7 @@ 2 godziny 8 godzin Ręcznie + Ustawienia wprowadzania Enter wysyła Używaj klawisza Enter do wysyłania wiadomości Pokaż klawisz Enter @@ -495,12 +508,16 @@ Białe tło Pokazuj otrzymane wiadomości jako czarny tekst na białym tle Sieć TOR jest niedostepna + Błąd połączenia (zasób) + Nieznana nazwa hosta Zepsute Obecność Status \"Oddalony\" gdy wyświetlacz jest wyłączony Oznacza Twój zasób jako \"Oddalony\", gdy wyświetlacz jest wyłączony Niedostepne w trybie cichym Oznacza Twój zasób jako \"Nieobecny\" gdy urządzenie jest w trybie cichym + Traktuj tryb wibracji jak tryb cichy + Oznacza twój zasób jako niedostępny kiedy urządzenie jest w trybie wibracji Rozszerzone ustawienia połączenia Pokaż nazwę hosta i ustawienia portu przy dodawaniu konta xmpp.examle.com @@ -512,6 +529,7 @@ Pobieranie preferencji archiwizacji. Proszę czekać... Nie można pobrać preferencji archiwizacji Captcha wymagana + Wprowadź tekst z powyższego obrazka Łańcuch certyfikatu nie jest zaufany Jabber ID nie odpowiada certyfikatowi Odnów certyfikat @@ -535,6 +553,8 @@ Załaduj wiecej wiadomości Dzielony plik z %s Dzielony obraz z %s + Obraz udostępniony %s + Tekst udostępniony %s Conversations potrzebuje dostęp do zewnętrznego magazynu Synchronizuj z kontaktami Conversations chce dopasować Twoje kontakty XMPP z listą kontaktów w telefonie, by uzupełnić ich pełne imiona oraz awatary.\nConversations jedynie przeczyta Twoje kontakty i dopasuje je lokalnie, bez wysyłania na Twój serwer.\n\nZostaniesz teraz poproszony o przydzielenie pozwolenia na odczyt Twoich kontaktów. @@ -563,4 +583,29 @@ To pole jest wymagane Popraw wiadomość Wyślij poprawioną wiadomość + Ten kontakt jest już zaufany. Wybierając \'ukończono\' potwierdzasz jedynie że %s jest częścią tej konferencji. + Wybierz i przytnij obraz + Wyłączyłeś to konto + Błąd bezpieczeństwa: nieprawidłowy dostęp do pliku + Nie odnaleziono aplikacji skojarzonej z URI + Udostępnij URI za pomocą... + XMPP jest protokołem niezależnym od dostawcy usług. Możesz używać tego klienta z dowolnym serwerem XMPP.\nJednak dla Twojej wygody ułatwiliśmy Ci stworzenie konta na conversations.im, serwerze specjalnie przystosowanym do używania z Conversations. + Przeprowadzimy Cię przez proces tworzenia konta na conversations.im.\nKiedy wybierzesz konto na serwerze conversations.im, będziesz mógł komunikować się z użytkownikami na innych serwerach podając im swój pełen Jabber ID. + Twój pełen Jabber ID będzie następujący: %s + Utwórz Konto + Użyj innego serwera + Wybierz nazwę użytkownika + Zmień dostępność ręcznie + Dotknij swojego avatara aby zmienić dostępność + Zmień dostępność + Status + Ustaw na wszystkich kontach na tym urządzeniu + Chętny do rozmowy + Dostępny + Zaraz Wracam + Niedostępny + Zajęty + Zostało wygenerowane bezpieczne hasło + Twoje urządzenie nie pozwala na wyłączenie optymalizacji baterii + Pokaż hasło diff --git a/src/main/res/values-pt-rBR/strings.xml b/src/main/res/values-pt-rBR/strings.xml index 917516934..4fe169c08 100644 --- a/src/main/res/values-pt-rBR/strings.xml +++ b/src/main/res/values-pt-rBR/strings.xml @@ -379,7 +379,6 @@ Criar conferência com... Não foi encontrado nenhum servidor de conferências Não foi possível criar a conferência! - A conferência foi criada! O segredo foi aceito! Redefinir Avatar da conta diff --git a/src/main/res/values-pt/strings.xml b/src/main/res/values-pt/strings.xml index 86107fcea..223d6ae72 100644 --- a/src/main/res/values-pt/strings.xml +++ b/src/main/res/values-pt/strings.xml @@ -377,7 +377,6 @@ Criar conferência com... Não foi encontrado nenhum servidor de conferências Criação de conferência falhou! - Conferência criada! Segredo aceite! Restaurar Avatar da conta diff --git a/src/main/res/values-ro-rRO/strings.xml b/src/main/res/values-ro-rRO/strings.xml index 448fc13ed..c37584936 100644 --- a/src/main/res/values-ro-rRO/strings.xml +++ b/src/main/res/values-ro-rRO/strings.xml @@ -379,7 +379,6 @@ Creeaza conferinta cu... Serverul conferintei nu a fost gasita Conferinta nu a putut fi creata! - Conferinta a fost creata! Secret acceptat! Reseteaza Avatar cont @@ -415,6 +414,7 @@ Dezactiveaza toate conturile Efectuaza actiune cu Fara afiliere + Deconectat proscris Membru Mod avansat @@ -511,6 +511,7 @@ Arata mesajele primite cu negru pe fond alb Reteaua Tor nu este disponibila Eroare de conexiune + Gazda necunoscuta Deteriorat Setari de prezenta Plecat cand ecranul este oprit @@ -609,4 +610,5 @@ Emitent Ocupat O parola sigura a fost generata Dispozitivul dumneavoastra nu suporta dezactivarea optimizarii de baterie pentru aceasta aplicatie + Arata parola diff --git a/src/main/res/values-ru/strings.xml b/src/main/res/values-ru/strings.xml index ffe47976e..7c7889f5f 100644 --- a/src/main/res/values-ru/strings.xml +++ b/src/main/res/values-ru/strings.xml @@ -362,7 +362,6 @@ Создать конференцию с... Сервер конференции не был найден Не удалось создать конференцию! - Конференция создана! Секретный ключ принят! Сброс Изображение учётной записи diff --git a/src/main/res/values-sk/strings.xml b/src/main/res/values-sk/strings.xml index f2c3f1ca4..2bea5a903 100644 --- a/src/main/res/values-sk/strings.xml +++ b/src/main/res/values-sk/strings.xml @@ -337,7 +337,6 @@ Vytvoriť skupinovú konverzáciu s… Nenašiel sa server na skupinovú konverzáciu Vytvorenie skupinovej konverzácie zlyhalo! - Skupinová konverzácia vytvorená! Tajomstvo prijaté! Vymazať Avatar účtu diff --git a/src/main/res/values-sr/strings.xml b/src/main/res/values-sr/strings.xml index b82100831..5ad978eb6 100644 --- a/src/main/res/values-sr/strings.xml +++ b/src/main/res/values-sr/strings.xml @@ -379,7 +379,6 @@ Направи групно ћаскање са… Сервер групног ћаскања није нађен Прављење групног ћаскања није успело! - Групно ћаскање направљено! Тајна прихваћена! Ресетуј Аватар налога diff --git a/src/main/res/values-sv/strings.xml b/src/main/res/values-sv/strings.xml index ab19da923..0688d97b2 100644 --- a/src/main/res/values-sv/strings.xml +++ b/src/main/res/values-sv/strings.xml @@ -379,7 +379,6 @@ Skapa konferens med… Ingen konferensserver hittad Kunde inte skapa konferens - Konferens skapad! Hemlighet accepterad! Återställ Kontots avatarbild @@ -415,6 +414,7 @@ Deaktivera alla konton Utför åtgärden med Ingen anknytning + Offline Utstött Medlem Avancerat läge @@ -509,6 +509,7 @@ Visa mottagna meddelanden som svart text på vit bakgrund Tor-nätverk ej tillgängligt Bind-fel + Server okänd Sönder Tillgänglighet Status borta när skärmen är av @@ -605,4 +606,5 @@ Upptagen Ett säkert lösenord har genererats Din enhet stödjer inte deaktivering av batterioptimeringar + Visa lösenord diff --git a/src/main/res/values-tr-rTR/strings.xml b/src/main/res/values-tr-rTR/strings.xml index 848934ee2..a2634ca69 100644 --- a/src/main/res/values-tr-rTR/strings.xml +++ b/src/main/res/values-tr-rTR/strings.xml @@ -376,7 +376,6 @@ … ile grup sohbet başlat Bir grup sohbet sunucusu bulunamadı Grup sohbet başlatılamadı! - Grup sohbet başladıldı! Gizli bilgi kabul edildi! Sıfırla Hesap avatarı diff --git a/src/main/res/values-vi/strings.xml b/src/main/res/values-vi/strings.xml index eb1d91ea7..73c952e93 100644 --- a/src/main/res/values-vi/strings.xml +++ b/src/main/res/values-vi/strings.xml @@ -352,7 +352,6 @@ Tạo diễn đàn với... Không tìm thấy máy chủ diễn đàn nào Tạo diễn đàn thất bại! - Đã tạo diễn đàn! Đã chấp thuận bí mật! Cài lại Ảnh đại diện tài khoản diff --git a/src/main/res/values-zh-rCN/strings.xml b/src/main/res/values-zh-rCN/strings.xml index afc03e222..df61bd1cb 100644 --- a/src/main/res/values-zh-rCN/strings.xml +++ b/src/main/res/values-zh-rCN/strings.xml @@ -377,7 +377,6 @@ 与…创建讨论组 无法找到讨论组服务器 讨论组创建失败! - 讨论组已创建! 秘密被接受! 重置 账户头像 -- cgit v1.2.3