diff options
| -rw-r--r-- | doc/snac.8 | 4 | ||||
| -rw-r--r-- | format.c | 7 |
2 files changed, 9 insertions, 2 deletions
| @@ -249,8 +249,8 @@ e.g. :happydoggo:). These images can be served from an external source or from t | |||
| 249 | .Pa static | 249 | .Pa static |
| 250 | directory of the instance admin. | 250 | directory of the instance admin. |
| 251 | .Pp | 251 | .Pp |
| 252 | If you want to disable any Emoji substitution, leave it as a 0 byte file | 252 | If you want to disable any Emoji substitution, change the file to contain |
| 253 | or with an empty JSON object ({}). | 253 | just an empty JSON object ({}). |
| 254 | .Ss SPAM Mitigation | 254 | .Ss SPAM Mitigation |
| 255 | There have been some SPAM attacks on the Fediverse and, as too many | 255 | There have been some SPAM attacks on the Fediverse and, as too many |
| 256 | instances and server implementations out there still allow automatic | 256 | instances and server implementations out there still allow automatic |
| @@ -58,6 +58,8 @@ xs_dict *emojis(void) | |||
| 58 | xs_json_dump(d, 4, f); | 58 | xs_json_dump(d, 4, f); |
| 59 | fclose(f); | 59 | fclose(f); |
| 60 | } | 60 | } |
| 61 | else | ||
| 62 | srv_log(xs_fmt("Error creating '%s'", fn)); | ||
| 61 | } | 63 | } |
| 62 | 64 | ||
| 63 | xs_dict *d = NULL; | 65 | xs_dict *d = NULL; |
| @@ -65,7 +67,12 @@ xs_dict *emojis(void) | |||
| 65 | if ((f = fopen(fn, "r")) != NULL) { | 67 | if ((f = fopen(fn, "r")) != NULL) { |
| 66 | d = xs_json_load(f); | 68 | d = xs_json_load(f); |
| 67 | fclose(f); | 69 | fclose(f); |
| 70 | |||
| 71 | if (d == NULL) | ||
| 72 | srv_log(xs_fmt("JSON parse error in '%s'", fn)); | ||
| 68 | } | 73 | } |
| 74 | else | ||
| 75 | srv_log(xs_fmt("Error opening '%s'", fn)); | ||
| 69 | 76 | ||
| 70 | return d; | 77 | return d; |
| 71 | } | 78 | } |