avoid sourceName might not have been initialized

This commit is contained in:
technillogue 2021-07-21 15:23:02 -04:00
parent f716fb64bf
commit 72e89cd0fc

View file

@ -68,9 +68,13 @@ public class JsonMessageEnvelope {
this.relay = null;
}
if (this.source != null) {
String name;
try {
this.sourceName = m.getContactOrProfileName(this.source);
} catch (InvalidNumberException e) {}
name = m.getContactOrProfileName(this.source);
} catch (InvalidNumberException e) {
name = null;
}
this.sourceName = name;
} else {
this.sourceName = null;
}