diff options
author | default <nobody@localhost> | 2023-06-28 21:47:00 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-06-28 21:47:00 +0200 |
commit | afebf086e761dec552741b2c6930764780ce24ff (patch) | |
tree | b59dc102846d2c78fe43ed5f6a2605664f422d68 /data.c | |
parent | 4b1f060be8dff81ed81c99a4c68de2e1b4727b62 (diff) |
Fixed unpinning indexing.
Diffstat (limited to 'data.c')
-rw-r--r-- | data.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1388,7 +1388,15 @@ int pin(snac *user, const char *id) int unpin(snac *user, const char *id) /* unpin a message */ { - return object_user_cache_del(user, id, "pinned"); + int ret = object_user_cache_del(user, id, "pinned"); + + if (ret != -1) { + /* delete from the index */ + xs *idx = xs_fmt("%s/pinned.idx", user->basedir); + index_del(idx, id); + } + + return ret; } |