Skip to content

Commit

Permalink
contacts: contact page updates no longer broadcast v0 news
Browse files Browse the repository at this point in the history
  • Loading branch information
mikolajpp committed Sep 16, 2024
1 parent ceb72b5 commit b1795a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions desk/app/contacts.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -227,21 +227,21 @@
(~(put by book) kip page)
:: this is a peer page, send v0 update
::
=? cor ?=(ship kip)
%+ p-news-0 kip
(to-contact-0 (contact-mod page))
:: =? cor ?=(ship kip)
:: %+ p-news-0 kip
:: (to-contact-0 (contact-mod page))
(p-news [%page kip page])
::
++ p-send-wipe
|= [=kip =page]
=. book
(~(del by book) kip)
:: peer overlay lost
::
=? cor &(?=(ship kip) !?=(~ q.page))
:: v0 peer contact is modified
%+ p-news-0 kip
(to-contact-0 p.page)
:: :: peer overlay lost: v0 peer contact is modified
:: ::
:: =? cor &(?=(ship kip) !?=(~ q.page))
:: :: v0 peer contact is modified
:: %+ p-news-0 kip
:: (to-contact-0 p.page)
(p-news [%wipe kip])
:: +p-send-spot: publish peer spot
::
Expand Down
6 changes: 3 additions & 3 deletions desk/tests/app/contacts.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@
;< caz=(list card) b (do-poke %contact-action-1 !>([%edit ~sun con-mod]))
;< ~ b
%+ ex-cards caz
:~ (ex-fact ~[/news] contact-news+!>([~sun (to-contact-0:c (~(uni by con-sun) con-mod))]))
:~ :: (ex-fact ~[/news] contact-news+!>([~sun (to-contact-0:c (~(uni by con-sun) con-mod))]))
(ex-fact ~[/v1/news] contact-news-1+!>([%page ~sun con-sun con-mod]))
==
:: despite the edit, ~sun peer contact is unchanged
Expand Down Expand Up @@ -525,7 +525,7 @@
;< caz=(list card) b (do-poke %contact-action-1 !>([%wipe ~[~sun]]))
;< ~ b
%+ ex-cards caz
:~ (ex-fact ~[/news] contact-news+!>([~sun (to-contact-0:c con-sun)]))
:~ :: (ex-fact ~[/news] contact-news+!>([~sun (to-contact-0:c con-sun)]))
(ex-fact ~[/v1/news] contact-news-1+!>([%wipe ~sun]))
==
:: ~sun contact page is removed
Expand Down Expand Up @@ -596,7 +596,7 @@
;< caz=(list card) b (do-poke %contact-action-1 !>([%edit ~sun con-mod]))
;< ~ b
%+ ex-cards caz
:~ (ex-fact ~[/news] contact-news+!>([~sun (to-contact-0:c (~(uni by con-sun) con-mod))]))
:~ :: (ex-fact ~[/news] contact-news+!>([~sun (to-contact-0:c (~(uni by con-sun) con-mod))]))
(ex-fact ~[/v1/news] contact-news-1+!>([%page ~sun con-sun con-mod]))
==
:: ~sun is dropped
Expand Down

0 comments on commit b1795a9

Please sign in to comment.