@Override
public void handleCommand(final Namespace ns, final RegistrationManager m) throws CommandException {
final boolean voiceVerification = ns.getBoolean("voice");
- final var captcha = ns.getString("captcha").replace("signalcaptcha://", "");
+ final var captchaString = ns.getString("captcha");
+ final var captcha = captchaString == null ? null : captchaString.replace("signalcaptcha://", "");
try {
m.register(voiceVerification, captcha);