commit 8619854

poesty  ·  2023-06-09 18:39:11 +0000 UTC
parent ab470e9
Ignore timestamps in mastoapi_id when filtering entries
1 files changed,  +3, -3
+3, -3
 1@@ -1172,7 +1172,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
 2 
 3                 /* only return entries older that max_id */
 4                 if (max_id) {
 5-                    if (strcmp(v, max_id) == 0)
 6+                    if (strcmp(v, max_id + 10) == 0)
 7                         max_id = NULL;
 8 
 9                     continue;
10@@ -1180,14 +1180,14 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
11 
12                 /* only returns entries newer than since_id */
13                 if (since_id) {
14-                    if (strcmp(v, since_id) == 0)
15+                    if (strcmp(v, since_id + 10) == 0)
16                         break;
17                 }
18 
19                 /* only returns entries newer than min_id */
20                 /* what does really "Return results immediately newer than ID" mean? */
21                 if (min_id) {
22-                    if (strcmp(v, min_id) == 0)
23+                    if (strcmp(v, min_id + 10) == 0)
24                         break;
25                 }
26