Skip to content

Commit

Permalink
Merge pull request #3216 from tloncorp/develop
Browse files Browse the repository at this point in the history
ops: move dev to staging
  • Loading branch information
arthyn authored Feb 8, 2024
2 parents b9b6972 + 6bddbb4 commit c26d613
Show file tree
Hide file tree
Showing 111 changed files with 2,118 additions and 5,047 deletions.
6 changes: 3 additions & 3 deletions desk/app/channels-server.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,12 @@
(put:on-v-posts:c posts.channel id ~ new)
::
%edit
?> =(src.bowl author.essay.c-post)
?> |(=(src.bowl author.essay.c-post) (is-admin:ca-perms src.bowl))
?> =(kind.nest -.kind-data.essay.c-post)
=/ post (get:on-v-posts:c posts.channel id.c-post)
?~ post `posts.channel
?~ u.post `posts.channel
?> =(src.bowl author.u.u.post)
?> |(=(src.bowl author.u.u.post) (is-admin:ca-perms src.bowl))
::TODO could optimize and no-op if the edit is identical to current
=/ new=v-post:c [-.u.u.post +(rev.u.u.post) essay.c-post]
:- `[%post id.c-post %set ~ new]
Expand Down Expand Up @@ -611,7 +611,7 @@
=/ reply (get:on-v-replies:c replies id.c-reply)
?~ reply `(put:on-v-replies:c replies id.c-reply ~)
?~ u.reply `replies
?> =(src.bowl author.u.u.reply)
?> |(=(src.bowl author.u.u.reply) (is-admin:ca-perms src.bowl))
:- `[%reply id.c-reply %set ~]
(put:on-v-replies:c replies id.c-reply ~)
::
Expand Down
92 changes: 9 additions & 83 deletions desk/app/chat.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
blocked=(set ship)
blocked-by=(set ship)
hidden-messages=(set id:c)
old-chats=(map flag:two:old:c chat:two:old:c) :: for migration
old-pins=(list whom:two:old:c)
old-chats=(map flag:old chat:old) :: for migration
old-pins=(list whom:old)
==
--
=| current-state
Expand Down Expand Up @@ -114,44 +114,14 @@
=+ !<([old=versioned-state cool=@ud] vase)
|-
?- -.old
%0 $(old (state-0-to-1 old))
%1 $(old (state-1-to-2 old))
%2 $(old (state-2-to-3 old))
%3 $(old (state-3-to-4 old))
%4 $(old (state-4-to-5 old))
%5 $(old (state-5-to-6 old))
%6 (emil(state old) (drop load:epos))
==
::
+$ versioned-state $%(current-state state-5 state-4 state-3 state-2 state-1 state-0)
+$ state-0
$: %0
chats=(map flag:zero chat:zero)
dms=(map ship dm:zero)
clubs=(map id:club:zero club:zero)
drafts=(map whom:zero story:zero)
pins=(list whom:zero)
bad=(set ship)
inv=(set ship)
voc=(map [flag:zero id:zero] (unit said:zero))
fish=(map [flag:zero @] id:zero)
:: true represents imported, false pending import
imp=(map flag:zero ?)
==
+$ state-1
$: %1
chats=(map flag:one chat:one)
dms=(map ship dm:one)
clubs=(map id:club:one club:one)
drafts=(map whom:one story:one)
pins=(list whom:one)
bad=(set ship)
inv=(set ship)
voc=(map [flag:one id:one] (unit said:one))
fish=(map [flag:one @] id:one)
:: true represents imported, false pending import
imp=(map flag:one ?)
==
+$ versioned-state $%(current-state state-5 state-4 state-3 state-2)
+$ state-2
$: %2
chats=(map flag:two chat:two)
Expand Down Expand Up @@ -209,16 +179,14 @@
blocked=(set ship)
blocked-by=(set ship)
hidden-messages=(set id:c)
old-chats=(map flag:two:old:c chat:two:old:c) :: for migration
old-pins=(list whom:two:old:c)
old-chats=(map flag:old chat:old) :: for migration
old-pins=(list whom:old)
==
+$ club-5 [heard:club:c remark=remark-5 =pact:c crew:club:c]
+$ dm-5 [=pact:c remark=remark-5 net:dm:c pin=_|]
+$ remark-5 [last-read=time watching=_| unread-threads=(set id:c)]
+$ state-6 current-state
++ zero zero:old:c
++ one one:old:c
++ two two:old:c
++ two old
++ three c
++ state-5-to-6
|= s=state-5
Expand Down Expand Up @@ -379,48 +347,6 @@
voc voc.s
chats chats.s
==
++ state-1-to-2
|= s=state-1
^- state-2
%* . *state-2
dms dms.s
clubs (clubs-1-to-2 clubs.s)
drafts drafts.s
pins pins.s
bad bad.s
inv inv.s
fish fish.s
voc voc.s
chats chats.s
==
::
++ clubs-1-to-2
|= clubs=(map id:club:one club:one)
^- (map id:club:two club:two)
%- ~(run by clubs)
|= =club:one
[*heard:club:two club]
::
++ state-0-to-1
|= s=state-0
^- state-1
%* . *state-1
dms dms.s
clubs (clubs-0-to-1 clubs.s)
drafts drafts.s
pins pins.s
bad bad.s
inv inv.s
fish fish.s
voc voc.s
chats chats.s
==
++ clubs-0-to-1
|= clubs=(map id:club:zero club:zero)
^- (map id:club:one club:one)
%- ~(run by clubs)
|= =club:zero
[*remark:one club]
--
::
++ poke
Expand Down Expand Up @@ -850,7 +776,7 @@
++ from-self =(our src):bowl
++ migrate
|%
++ t two:old:c
++ t old
++ server
=/ server-channels=v-channels:d
%+ convert-channels &
Expand Down Expand Up @@ -907,9 +833,9 @@
::
++ trim
=- =. old-chats - cor
^- (map flag:two:old:c chat:two:old:c)
^- (map flag:old chat:old)
%- ~(run by old-chats)
|= old-chat=chat:two:old:c
|= old-chat=chat:old
=/ citations=(set [ship time])
%- sy
^- (list [ship time])
Expand Down
30 changes: 1 addition & 29 deletions desk/app/diary.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
=+ !<([old=versioned-state cool=epic:e] vase)
|-
?- -.old
%0 $(old (state-0-to-1 old))
%1 $(old (state-1-to-2 old))
::
%2
Expand All @@ -115,14 +114,7 @@
$(diaries t.diaries)
==
::
+$ versioned-state $%(current-state state-0 state-1)
+$ state-0
$: %0
shelf=shelf:zero
voc=(map [flag:zero plan:zero] (unit said:zero))
:: true represents imported, false pending import
imp=(map flag:zero ?)
==
+$ versioned-state $%(current-state state-1)
+$ state-1
$: %1
=shelf:d
Expand All @@ -131,7 +123,6 @@
imp=(map flag:d ?)
==
+$ state-2 current-state
++ zero zero:old:d
++ state-1-to-2
|= s=state-1
^- state-2
Expand All @@ -142,25 +133,6 @@
imp imp.s
==
::
++ state-0-to-1
|= s=state-0
^- state-1
%* . *state-1
shelf (convert-shelf shelf.s)
voc voc.s
imp imp.s
==
::
++ convert-shelf
|= old-shelf=shelf:zero
^- shelf:d
%- malt
%+ turn
~(tap by old-shelf)
|= [=flag:d old-diary=diary:zero]
^- [flag:d diary:d]
[flag [~ old-diary]]
::
++ restore-missing-subs
%+ roll
~(tap by shelf)
Expand Down
Loading

0 comments on commit c26d613

Please sign in to comment.