Don't send FormatBuilder if string is empty

This commit is contained in:
Frank van der Heijden 2021-01-29 22:00:36 +01:00
parent a11d703c42
commit 2dcc4f36ee
No known key found for this signature in database
GPG key ID: 26DA56488D314D11

View file

@ -48,7 +48,7 @@ public class FormatBuilder {
String message = format;
for (int i = 0; i < length; i++) {
String value = values[i];
if (value == null && !alwaysSend) return;
if ((value == null || value.isEmpty()) && !alwaysSend) return;
message = message.replace(orderedKeys[i], String.valueOf(value));
}
Messenger.sendRawMessage(sender, message);