diff options
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 | ||