diff --git a/src/main/java/eu/siacs/conversations/ui/util/PresenceSelector.java b/src/main/java/eu/siacs/conversations/ui/util/PresenceSelector.java index 6edcf3349..d9cda665a 100644 --- a/src/main/java/eu/siacs/conversations/ui/util/PresenceSelector.java +++ b/src/main/java/eu/siacs/conversations/ui/util/PresenceSelector.java @@ -32,6 +32,7 @@ package eu.siacs.conversations.ui.util; import android.app.Activity; import android.content.Context; import android.util.Pair; +import android.widget.Toast; import androidx.appcompat.app.AlertDialog; @@ -60,7 +61,9 @@ public class PresenceSelector { public static void selectFullJidForDirectRtpConnection(final Activity activity, final Contact contact, final RtpCapability.Capability required, final OnFullJidSelected onFullJidSelected) { final String[] resources = RtpCapability.filterPresences(contact, required); - if (resources.length == 1) { + if (resources.length == 0) { + Toast.makeText(activity,R.string.rtp_state_contact_offline,Toast.LENGTH_LONG).show(); + } else if (resources.length == 1) { onFullJidSelected.onFullJidSelected(contact.getJid().withResource(resources[0])); } else { showPresenceSelectionDialog(activity, contact, resources, onFullJidSelected);