commit d03b988

default  ·  2022-11-26 12:34:43 +0000 UTC
parent 8e7efad
Don't call object_del() from timeline_del().

Only delete from each user's cache, not from the global database.
2 files changed,  +6, -4
M data.c
M html.c
M data.c
+3, -4
 1@@ -762,10 +762,9 @@ int timeline_del(snac *snac, char *id)
 2         ret = 200;
 3     }
 4 
 5-    if (valid_status(object_del(id))) {
 6-        object_user_cache_del(snac, id, "public");
 7-        object_user_cache_del(snac, id, "private");
 8-    }
 9+    /* delete from the user's caches */
10+    object_user_cache_del(snac, id, "public");
11+    object_user_cache_del(snac, id, "private");
12 
13     return ret;
14 }
M html.c
+3, -0
 1@@ -1341,6 +1341,9 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
 2 
 3                 post(&snac, msg);
 4 
 5+                /* FIXME: also post this Tombstone to people
 6+                   that Announce'd it */
 7+
 8                 snac_log(&snac, xs_fmt("posted tombstone for %s", id));
 9             }
10