Make sure answers are being sent

This commit is contained in:
M66B
2020-02-21 17:38:46 +01:00
parent d7fc63aa77
commit 9df27c1240
2 changed files with 19 additions and 0 deletions

View File

@@ -104,6 +104,8 @@ public class EntityRule {
static final String EXTRA_SENDER = "sender";
static final String EXTRA_SUBJECT = "subject";
private static final long SEND_DELAY = 5000L; // milliseconds
boolean matches(Context context, EntityMessage message, Message imessage) throws MessagingException {
try {
JSONObject jcondition = new JSONObject(condition);
@@ -422,6 +424,9 @@ public class EntityRule {
EntityOperation.queue(context, reply, EntityOperation.SEND);
// Batch send operations, wait until after commit
ServiceSend.schedule(context, SEND_DELAY);
return true;
}