diff options
| -rw-r--r-- | RELEASE_NOTES.md | 4 | ||||
| -rw-r--r-- | mastoapi.c | 9 | ||||
| -rw-r--r-- | utils.c | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 28bcf56..37a8f97 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md | |||
| @@ -12,6 +12,10 @@ Fixed broken NetBSD build (missing dependency in Makefile.NetBSD). | |||
| 12 | 12 | ||
| 13 | The user profile can now include longitude and latitude data for your current location. | 13 | The user profile can now include longitude and latitude data for your current location. |
| 14 | 14 | ||
| 15 | Mastodon API: implemented limit= on notification fetches (contributed by nowster). | ||
| 16 | |||
| 17 | Reduced RSA key size for new users from 4096 to 2048. This will be friendlier to smaller machines, and everybody else out there is using 2048. | ||
| 18 | |||
| 15 | ## 2.68 | 19 | ## 2.68 |
| 16 | 20 | ||
| 17 | Fixed regression in link verification code (contributed by nowster). | 21 | Fixed regression in link verification code (contributed by nowster). |
| @@ -1826,6 +1826,11 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, | |||
| 1826 | const xs_list *excl = xs_dict_get(args, "exclude_types[]"); | 1826 | const xs_list *excl = xs_dict_get(args, "exclude_types[]"); |
| 1827 | const char *min_id = xs_dict_get(args, "min_id"); | 1827 | const char *min_id = xs_dict_get(args, "min_id"); |
| 1828 | const char *max_id = xs_dict_get(args, "max_id"); | 1828 | const char *max_id = xs_dict_get(args, "max_id"); |
| 1829 | const char *limit = xs_dict_get(args, "limit"); | ||
| 1830 | int limit_count = 0; | ||
| 1831 | if (!xs_is_null(limit)) { | ||
| 1832 | limit_count = atoi(limit); | ||
| 1833 | } | ||
| 1829 | 1834 | ||
| 1830 | if (dbglevel) { | 1835 | if (dbglevel) { |
| 1831 | xs *js = xs_json_dumps(args, 0); | 1836 | xs *js = xs_json_dumps(args, 0); |
| @@ -1913,6 +1918,10 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, | |||
| 1913 | } | 1918 | } |
| 1914 | 1919 | ||
| 1915 | out = xs_list_append(out, mn); | 1920 | out = xs_list_append(out, mn); |
| 1921 | if (!xs_is_null(limit)) { | ||
| 1922 | if (--limit_count <= 0) | ||
| 1923 | break; | ||
| 1924 | } | ||
| 1916 | } | 1925 | } |
| 1917 | 1926 | ||
| 1918 | srv_debug(1, xs_fmt("mastoapi_notifications count %d", xs_list_len(out))); | 1927 | srv_debug(1, xs_fmt("mastoapi_notifications count %d", xs_list_len(out))); |
| @@ -330,7 +330,7 @@ int adduser(const char *uid) | |||
| 330 | } | 330 | } |
| 331 | 331 | ||
| 332 | printf("\nCreating RSA key...\n"); | 332 | printf("\nCreating RSA key...\n"); |
| 333 | key = xs_evp_genkey(4096); | 333 | key = xs_evp_genkey(2048); |
| 334 | printf("Done.\n"); | 334 | printf("Done.\n"); |
| 335 | 335 | ||
| 336 | xs *kfn = xs_fmt("%s/key.json", basedir); | 336 | xs *kfn = xs_fmt("%s/key.json", basedir); |