diff options
| author | 2022-10-20 10:34:32 +0200 | |
|---|---|---|
| committer | 2022-10-20 10:34:32 +0200 | |
| commit | a16600e3307050619d4866f95ebd0fb43034005c (patch) | |
| tree | 45ade1fdcb755d5589452e2a66239d0cae7e71eb /data.c | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | snac2-a16600e3307050619d4866f95ebd0fb43034005c.tar.gz snac2-a16600e3307050619d4866f95ebd0fb43034005c.tar.xz snac2-a16600e3307050619d4866f95ebd0fb43034005c.zip | |
Better 'Delete' message logging.
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 9 |
1 files changed, 7 insertions, 2 deletions
| @@ -321,10 +321,11 @@ d_char *timeline_find(snac *snac, char *id) | |||
| 321 | } | 321 | } |
| 322 | 322 | ||
| 323 | 323 | ||
| 324 | void timeline_del(snac *snac, char *id) | 324 | int timeline_del(snac *snac, char *id) |
| 325 | /* deletes a message from the timeline */ | 325 | /* deletes a message from the timeline */ |
| 326 | { | 326 | { |
| 327 | xs *fn = _timeline_find_fn(snac, id); | 327 | int ret = 404; |
| 328 | xs *fn = _timeline_find_fn(snac, id); | ||
| 328 | 329 | ||
| 329 | if (fn != NULL) { | 330 | if (fn != NULL) { |
| 330 | xs *lfn = NULL; | 331 | xs *lfn = NULL; |
| @@ -337,7 +338,11 @@ void timeline_del(snac *snac, char *id) | |||
| 337 | 338 | ||
| 338 | if (unlink(lfn) != -1) | 339 | if (unlink(lfn) != -1) |
| 339 | snac_debug(snac, 1, xs_fmt("timeline_del (local) %s", id)); | 340 | snac_debug(snac, 1, xs_fmt("timeline_del (local) %s", id)); |
| 341 | |||
| 342 | ret = 200; | ||
| 340 | } | 343 | } |
| 344 | |||
| 345 | return ret; | ||
| 341 | } | 346 | } |
| 342 | 347 | ||
| 343 | 348 | ||