Don't send FormatBuilder if string is empty
This commit is contained in:
parent
a11d703c42
commit
2dcc4f36ee
1 changed files with 1 additions and 1 deletions
|
|
@ -48,7 +48,7 @@ public class FormatBuilder {
|
||||||
String message = format;
|
String message = format;
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
String value = values[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));
|
message = message.replace(orderedKeys[i], String.valueOf(value));
|
||||||
}
|
}
|
||||||
Messenger.sendRawMessage(sender, message);
|
Messenger.sendRawMessage(sender, message);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue