Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions desks/realm/lib/groups.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@
=/ groups .^(groups:g %gx /(scot %p our)/groups/(scot %da now)/groups/groups)
:: find ours
=/ hosted
^- (list [f=flag:g g=group:g])
^- (list [f=flag:g g=group-ui:g])
%+ skim ~(tap by groups)
|= [f=flag:g g=group:g]
|= [f=flag:g g=group-ui:g]
=(our -.f)
:: get metadata for each
%+ turn hosted
|= [=flag:g =group:g]
|= [=flag:g =group-ui:g]
^- group-space
=/ access
?: =(-.cordon.group %open)
?: =(-.cordon.group-ui %open)
%public
%private
=/ metadata meta.group
=/ metadata meta.group-ui
:: Get group data
=/ member-count=@u
(lent ~(tap by fleet.group))
(lent ~(tap by fleet.group-ui))
:: Get metadata
=/ title=@t title.metadata
=/ image=@t image.metadata
Expand All @@ -43,7 +43,7 @@
::
++ get-group
|= [rid=[entity=ship name=@tas] our=ship now=@da]
^- group:g
^- group-ui:g
=/ groups .^(groups:g %gx /(scot %p our)/groups/(scot %da now)/groups/groups)
(~(got by groups) rid)
::
Expand Down Expand Up @@ -122,4 +122,4 @@
[roles/a/[roles]]
==
--
--
--
39 changes: 20 additions & 19 deletions desks/realm/lib/realm-chat.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@
body.request
:- ~
%- as-octt:mimes:html
%- en-json:html
%- trip
%- en:json:html
%+ notify-request:encode
note
devices.state
Expand Down Expand Up @@ -223,7 +224,7 @@
?: (dm-already-exists type.c.act all-ships bowl)
=/ log1 (maybe-log hide-debug.state "dm between {<all-ships>} already exists")
`state
=/ all-peers=ship-roles:db
=/ all-peers=ship-roles:db
%+ turn
all-ships
|= s=ship
Expand Down Expand Up @@ -255,7 +256,7 @@
=/ host-peer (snag 0 (skim pathpeers |=(p=peer-row:db =(role.p %host))))
=/ ogpath (scry-path-row path.act bowl)

=/ cards
=/ cards
?: &(=(type.ogpath %dm) ?!(=(patp.host-peer our.bowl)))
:: non-hosts are allowed to edit %dm type chats, but can only do
:: so by relaying the request through the host-peer, since chat-db
Expand All @@ -281,7 +282,7 @@
(~(del in pins.pathrow) msg-id.act)

=/ pathpeers (scry-peers path.act bowl)
=/ cards
=/ cards
:: we poke all peers/members' db with edit-path-pins (including ourselves)
%: turn
pathpeers
Expand Down Expand Up @@ -312,7 +313,7 @@
?~ host.act !! :: have to pass the host if we are adding ourselves
:_ state
[%pass /dbpoke %agent [(need host.act) dap.bowl] %poke %chat-action !>([%add-ship-to-chat path.act ship.act ~])]~

=/ pathrow (scry-path-row path.act bowl)
?> ?| =(src.bowl our.bowl)
&(?!(=(src.bowl our.bowl)) =(invites.pathrow %open))
Expand Down Expand Up @@ -380,7 +381,7 @@
:: read the peers for the path
=/ pathpeers (scry-peers path.act bowl)
=/ official-time t.act
=/ cards
=/ cards
%: turn
pathpeers
|=(a=peer-row:db (into-insert-message-poke a +.act official-time))
Expand All @@ -397,7 +398,7 @@
:: just pass along the edit-message-action to all the peers chat-db
:: %chat-db will disallow invalid signals
=/ pathpeers (scry-peers path.act bowl)
=/ cards
=/ cards
%: turn
pathpeers
|=(p=peer-row:db (into-edit-message-poke p act))
Expand All @@ -413,7 +414,7 @@
:: just pass along the delete msg-id to all the peers chat-db
:: %chat-db will disallow invalid signals
=/ pathpeers (scry-peers path.act bowl)
=/ cards
=/ cards
%: turn
pathpeers
|=(p=peer-row:db (into-delete-message-poke p msg-id.act))
Expand Down Expand Up @@ -544,7 +545,7 @@
^- json
=/ player-ids ~(val by devices)
=/ base-list
:~
:~
['app_id' s+app-id.notif]
['data' (mtd data.notif)]
['include_player_ids' a+(turn player-ids |=([id=@t] s+id))]
Expand All @@ -562,7 +563,7 @@
['contents' (contents contents.notif)]
extended-list
::
++ mtd
++ mtd
|= mtd=push-mtd
^- json
%- pairs
Expand All @@ -573,7 +574,7 @@
['msg' a+(turn message.mtd |=(m=msg-part:db (messages-row:encode:chat-db [msg-id.m msg-part-id.m] m)))]
==
::
++ contents
++ contents
|= contents=(map cord cord)
^- json
=/ message (~(got by contents) 'en')
Expand All @@ -584,7 +585,7 @@
|= =devices
^- json
%- pairs
:~
:~
:- %devices
%- pairs
%+ turn ~(tap by devices)
Expand Down Expand Up @@ -682,14 +683,14 @@
::
++ path-and-ship
%- ot
:~
:~
[%path pa]
[%ship de-ship]
==
::
++ de-edit-info
%- ot
:~
:~
[%msg-id de-msg-id]
[%path pa]
de-frag
Expand All @@ -710,15 +711,15 @@
::
++ path-and-fragments
%- ot
:~
:~
[%path pa]
de-frag
[%expires-in null-or-dri]
==
::
++ de-content
%- of
:~
:~
[%plain so]
[%markdown so]
[%bold so]
Expand All @@ -743,14 +744,14 @@
::
++ path-and-msg-id
%- ot
:~
:~
[%path pa]
[%msg-id de-msg-id]
==
::
++ pin-message
%- ot
:~
:~
[%path pa]
[%msg-id de-msg-id]
[%pin bo]
Expand All @@ -771,4 +772,4 @@
==
--
--
--
--
28 changes: 19 additions & 9 deletions desks/realm/sur/new-groups.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
/- grp=group-store
/- metadata-store
|%
++ okay `epic:e`2
++ mar
|%
++ act `mark`(rap 3 %group-action '-' (scot %ud okay) ~)
++ upd `mark`(rap 3 %group-update '-' (scot %ud okay) ~)
++ log `mark`(rap 3 %group-log '-' (scot %ud okay) ~)
++ int `mark`(rap 3 %group-init '-' (scot %ud okay) ~)
--
:: $flag: ID for a group
::
+$ flag (pair ship term)
Expand All @@ -17,7 +25,7 @@
::
:: $zone: channel grouping
::
:: includes its own metadata for display and keeps the order of
:: includes its own metadata for display and keeps the order of
:: channels within.
::
:: zone: the term that represents the ID of a zone
Expand All @@ -28,7 +36,7 @@
:: %edit: modify the zone metadata
:: %mov: reorders the zone in the group
:: %mov-nest: reorders a channel within the zone
::
::
++ zone
=< zone
|%
Expand All @@ -42,7 +50,7 @@
$% [%add meta=data:meta]
[%del ~]
[%edit meta=data:meta]
[%mov idx=@ud]
[%mov idx=@ud]
[%mov-nest =nest idx=@ud]
==
--
Expand Down Expand Up @@ -98,7 +106,7 @@
==
::
:: $diff: represents the set of actions you can take on a channel
::
::
:: add: create a channel
:: edit: edit a channel
:: del: delete a channel
Expand All @@ -112,7 +120,7 @@
[%edit =channel]
[%del ~]
::
[%add-sects sects=(set sect)]
[%add-sects sects=(set sect)]
[%del-sects sects=(set sect)]
::
[%zone =zone]
Expand All @@ -139,6 +147,7 @@
meta=data:meta
==
::
+$ group-ui [group saga=(unit saga:e)]
:: $cabal: metadata representing a $sect or role
::
++ cabal
Expand Down Expand Up @@ -266,7 +275,7 @@
$: name=term
title=cord
description=cord
image=cord
image=cord
cover=cord
=cordon
members=(jug ship sect)
Expand All @@ -275,8 +284,9 @@
::
+$ init [=time =group]
::
:: $groups: map for frontend to display groups
+$ groups
(map flag group)
(map flag group-ui)
+$ net-groups
(map flag [net group])
::
Expand Down Expand Up @@ -307,7 +317,7 @@
::
+$ knock flag
::
:: $progress: the state of a group join
:: $progress: the state of a group join
::
+$ progress
?(%knocking %adding %watching %done %error)
Expand All @@ -321,7 +331,7 @@
::
:: $preview: the metadata and entry policy for a group
::
+$ preview
+$ preview
$: =flag
meta=data:meta
=cordon
Expand Down
2 changes: 1 addition & 1 deletion desks/realm/sys.kelvin
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[%zuse 413]
[%zuse 412]
1 change: 1 addition & 0 deletions desks/usher/lib/dbug.hoon
1 change: 1 addition & 0 deletions desks/usher/lib/default-agent.hoon
1 change: 1 addition & 0 deletions desks/usher/lib/skeleton.hoon
1 change: 1 addition & 0 deletions desks/usher/lib/verb.hoon
1 change: 1 addition & 0 deletions desks/usher/mar/bill.hoon
1 change: 1 addition & 0 deletions desks/usher/mar/mime.hoon
1 change: 1 addition & 0 deletions desks/usher/mar/ship.hoon
1 change: 1 addition & 0 deletions desks/usher/sur/verb.hoon
2 changes: 1 addition & 1 deletion desks/usher/sys.kelvin
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[%zuse 413]
[%zuse 412]
2 changes: 1 addition & 1 deletion desks/watch-desks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ done
echo "Watching for changes to copy to ${PIER}..."
while [ 0 ]
do
rsync -rL --del --exclude '.*' --exclude '*.sh' --exclude '*.md' --exclude '/usher' * $PIER/
rsync -rL --del --exclude '.*' --exclude '*.sh' --exclude '*.md' * $PIER/
sleep 0.8
done
2 changes: 1 addition & 1 deletion urbit
Submodule urbit updated 142 files