Include registered state in support email.

This commit is contained in:
Greyson Parrelli
2026-04-10 16:18:08 -04:00
committed by Cody Henthorne
parent c449f72786
commit 01705459cf
2 changed files with 11 additions and 1 deletions

View File

@@ -12,7 +12,9 @@ import org.signal.core.util.ResourceUtil;
import org.signal.core.util.Util;
import org.thoughtcrime.securesms.BuildConfig;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.dependencies.AppDependencies;
import org.thoughtcrime.securesms.keyvalue.SignalStore;
import org.thoughtcrime.securesms.recipients.Recipient;
import java.util.Locale;
import java.util.concurrent.TimeUnit;
@@ -71,7 +73,9 @@ public final class SupportEmailUtil {
"\n" +
context.getString(R.string.SupportEmailUtil_locale) + " " + Locale.getDefault().toString() +
"\n" +
context.getString(R.string.SupportEmailUtil_challenge_received) + " " + getChallengeReceived();
context.getString(R.string.SupportEmailUtil_challenge_received) + " " + getChallengeReceived() +
"\n" +
context.getString(R.string.SupportEmailUtil_registered) + " " + getRegistered(context);
}
private static CharSequence getDeviceInfo() {
@@ -100,4 +104,9 @@ public final class SupportEmailUtil {
return receivedRecently ? "yes" : "no";
}
private static String getRegistered(Context context) {
boolean registered = SignalStore.account().isRegistered() && !TextSecurePreferences.isUnauthorizedReceived(context);
return registered ? "yes" : "no";
}
}

View File

@@ -3087,6 +3087,7 @@
<string name="SupportEmailUtil_registration_lock">Registration lock:</string>
<string name="SupportEmailUtil_locale" translatable="false">Locale:</string>
<string name="SupportEmailUtil_challenge_received" translatable="false">Challenge Received:</string>
<string name="SupportEmailUtil_registered" translatable="false">Registered:</string>
<!-- ThreadRecord -->
<string name="ThreadRecord_group_updated">Group updated</string>