mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 22:45:05 +00:00
Fixed unpinning indexing.
This commit is contained in:
parent
4b1f060be8
commit
afebf086e7
1 changed files with 9 additions and 1 deletions
10
data.c
10
data.c
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue