diff options
| author | 2023-06-10 02:39:11 +0800 | |
|---|---|---|
| committer | 2023-06-10 02:39:11 +0800 | |
| commit | 86198549e77cfb6a862d9f96b4f035bd6d73c773 (patch) | |
| tree | 92647d5dcc9b0a75748ebdebbd32f9bba1102455 | |
| parent | Updated TODO. (diff) | |
| download | snac2-86198549e77cfb6a862d9f96b4f035bd6d73c773.tar.gz snac2-86198549e77cfb6a862d9f96b4f035bd6d73c773.tar.xz snac2-86198549e77cfb6a862d9f96b4f035bd6d73c773.zip | |
Ignore timestamps in mastoapi_id when filtering entries
| -rw-r--r-- | mastoapi.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1172,7 +1172,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, | |||
| 1172 | 1172 | ||
| 1173 | /* only return entries older that max_id */ | 1173 | /* only return entries older that max_id */ |
| 1174 | if (max_id) { | 1174 | if (max_id) { |
| 1175 | if (strcmp(v, max_id) == 0) | 1175 | if (strcmp(v, max_id + 10) == 0) |
| 1176 | max_id = NULL; | 1176 | max_id = NULL; |
| 1177 | 1177 | ||
| 1178 | continue; | 1178 | continue; |
| @@ -1180,14 +1180,14 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, | |||
| 1180 | 1180 | ||
| 1181 | /* only returns entries newer than since_id */ | 1181 | /* only returns entries newer than since_id */ |
| 1182 | if (since_id) { | 1182 | if (since_id) { |
| 1183 | if (strcmp(v, since_id) == 0) | 1183 | if (strcmp(v, since_id + 10) == 0) |
| 1184 | break; | 1184 | break; |
| 1185 | } | 1185 | } |
| 1186 | 1186 | ||
| 1187 | /* only returns entries newer than min_id */ | 1187 | /* only returns entries newer than min_id */ |
| 1188 | /* what does really "Return results immediately newer than ID" mean? */ | 1188 | /* what does really "Return results immediately newer than ID" mean? */ |
| 1189 | if (min_id) { | 1189 | if (min_id) { |
| 1190 | if (strcmp(v, min_id) == 0) | 1190 | if (strcmp(v, min_id + 10) == 0) |
| 1191 | break; | 1191 | break; |
| 1192 | } | 1192 | } |
| 1193 | 1193 | ||