summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authorGravatar default2022-10-20 10:34:32 +0200
committerGravatar default2022-10-20 10:34:32 +0200
commita16600e3307050619d4866f95ebd0fb43034005c (patch)
tree45ade1fdcb755d5589452e2a66239d0cae7e71eb /data.c
parentUpdated RELEASE_NOTES. (diff)
downloadsnac2-a16600e3307050619d4866f95ebd0fb43034005c.tar.gz
snac2-a16600e3307050619d4866f95ebd0fb43034005c.tar.xz
snac2-a16600e3307050619d4866f95ebd0fb43034005c.zip
Better 'Delete' message logging.
Diffstat (limited to '')
-rw-r--r--data.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/data.c b/data.c
index e86f97f..cef4028 100644
--- a/data.c
+++ b/data.c
@@ -321,10 +321,11 @@ d_char *timeline_find(snac *snac, char *id)
321} 321}
322 322
323 323
324void timeline_del(snac *snac, char *id) 324int 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