From d2cc5a5658edcb50135058f11e4c596530838e76 Mon Sep 17 00:00:00 2001 From: Fang Date: Wed, 17 Jan 2018 00:20:34 +0100 Subject: [PATCH] Fixed weird code for updating /circles subscriptions. No longer incorrectly uses the subscriber's ship name when getting the affected story. --- app/hall.hoon | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/app/hall.hoon b/app/hall.hoon index 7750b17de3..2f89c5c997 100644 --- a/app/hall.hoon +++ b/app/hall.hoon @@ -2323,17 +2323,25 @@ ::REVIEW this could be considered leaky, since it :: doesn't check if {who} ever knew of {nom}, :: but does that matter? can't really check.. + :: if the story got deleted, remove it from the circles listing. ?: ?=($remove -.det.det) `| - =+ soy=(~(got by stories) who.qer) - ?. ?| ?=($new -.det.det) - ?& ?=($config -.det.det) - ?=($permit -.dif.det.det) - ?=(?($channel $village) sec.con.shape.soy) - (~(has in sis.dif.det.det) who.qer) - == + =+ soy=(~(got by stories) nom.det) + :: if the story got created, or something about the read permissions set + :: for the subscriber changed, update the circles listing. + =; dif/? + ?. dif ~ + =+ (~(so-visible so:ta nom.det ~ soy) who.qer) + :: if the story just got created, don't send a remove rumor, because it + :: never showed up in the first place. + ?:(?=($new -.det.det) ?:(- `- ~) `-) + ?| ?=($new -.det.det) + :: + ?& ?=($config -.det.det) + ?=($permit -.dif.det.det) + ?=(?($channel $village) sec.con.shape.soy) + (~(has in sis.dif.det.det) who.qer) == - ~ - `(~(so-visible so:ta nom.det ~ soy) who.qer) + == :: $public ?. ?=($public -.det) ~