summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'data.c')
-rw-r--r--data.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/data.c b/data.c
index e3275cb..9972865 100644
--- a/data.c
+++ b/data.c
@@ -1388,7 +1388,15 @@ int pin(snac *user, const char *id)
1388int unpin(snac *user, const char *id) 1388int unpin(snac *user, const char *id)
1389/* unpin a message */ 1389/* unpin a message */
1390{ 1390{
1391 return object_user_cache_del(user, id, "pinned"); 1391 int ret = object_user_cache_del(user, id, "pinned");
1392
1393 if (ret != -1) {
1394 /* delete from the index */
1395 xs *idx = xs_fmt("%s/pinned.idx", user->basedir);
1396 index_del(idx, id);
1397 }
1398
1399 return ret;
1392} 1400}
1393 1401
1394 1402