Don't spit anything out to client for RUN-type reminders in server mode.

This commit is contained in:
Dianne Skoll
2024-02-29 09:31:37 -05:00
parent 0f782f7697
commit 9e0a74e583

View File

@@ -398,7 +398,7 @@ void HandleQueuedReminders(void)
/* Trigger the reminder */
CreateParser(q->text, &p);
RunDisabled = q->RunDisabled;
if (IsServerMode()) {
if (IsServerMode() && q->typ != RUN_TYPE) {
if (DaemonJSON) {
printf("{\"response\":\"reminder\",");
PrintJSONKeyPairString("ttime", SimpleTimeNoSpace(q->tt.ttime));
@@ -424,16 +424,18 @@ void HandleQueuedReminders(void)
DynamicBuffer out;
DBufInit(&out);
(void) TriggerReminder(&p, &q->t, &q->tt, DSEToday, 1, &out);
printf("\"body\":\"");
chomp(&out);
PrintJSONString(DBufValue(&out));
printf("\"}\n");
if (q->typ != RUN_TYPE) {
printf("\"body\":\"");
chomp(&out);
PrintJSONString(DBufValue(&out));
printf("\"}\n");
}
DBufFree(&out);
} else {
(void) TriggerReminder(&p, &q->t, &q->tt, DSEToday, 1, NULL);
}
FileName = NULL;
if (IsServerMode() && !DaemonJSON) {
if (IsServerMode() && !DaemonJSON && q->typ != RUN_TYPE) {
printf("NOTE endreminder\n");
}
fflush(stdout);