diff --git a/pkg/arvo/app/chat.hoon b/pkg/arvo/app/chat.hoon index 5c07152ac..a1320f561 100644 --- a/pkg/arvo/app/chat.hoon +++ b/pkg/arvo/app/chat.hoon @@ -155,7 +155,7 @@ :: fill remote configs with message data :: =* messages messages.str - =/ circle=circle:hall [`@p`(slav %p &2:wir) &3:wir] + =/ circle [`@p`(slav %p &2:wir) &3:wir] =/ peers=(map circle:hall (set @p)) %- ~(rep by rem.pes.piz) |= [[cir=circle:hall grp=group:hall] acc=(map circle:hall (set @p))] @@ -183,7 +183,10 @@ (~(put by acc) cir (silt (turn ~(tap by grp) head))) :: :- - %+ turn ~(tap in (~(del in (silt circles)) [our.bol %inbox])) + %+ turn + %~ tap in + %- ~(del in (silt circles)) + [our.bol %inbox] |= cir=circle:hall %+ hall-peer /circle/(scot %p our.bol)/[nom.cir]/config/group @@ -193,7 +196,7 @@ peers.str (~(put by peers) [our.bol %inbox] ~(key by loc.pes.piz)) :: configs.str - %- ~(uni in configs.str) + %- ~(uni by configs.str) ^- (map circle:hall (unit config:hall)) (~(run by rem.cos.piz) some) :: @@ -306,8 +309,9 @@ ^- (quip move _this) ?> ?=(%gram -.sto) =* messages messages.str - =/ circle=circle:hall [`@p`(slav %p &2:wir) &3:wir] - =/ nes=(unit (list envelope:hall)) (~(get by messages) circle) + =/ circle [`@p`(slav %p &2:wir) &3:wir] + =/ nes=(unit (list envelope:hall)) + (~(get by messages) circle) ?~ nes [~ this] =. messages.str (~(put by messages) circle (snoc u.nes nev.sto)) @@ -454,11 +458,11 @@ :: paginated message data :: [%'~chat' %scroll @t @t @t @t ~] - =/ cir=circle:hall [(slav %p &3:site.request-line) &4:site.request-line] + =/ cir [(slav %p &3:site.request-line) &4:site.request-line] =/ start=@ud (need (rush &5:site.request-line dem)) =/ parsedend=@ud (need (rush &6:site.request-line dem)) =* messages messages.str - =/ envs/(unit (list envelope:hall)) (~(get by messages) cir) + =/ envs=(unit (list envelope:hall)) (~(get by messages) cir) ?~ envs [~ this] ?: (gte start (lent u.envs)) @@ -468,13 +472,14 @@ (dec (lent u.envs)) parsedend =/ offset (sub end start) - =/ jon=json %- msg-to-json - :* %messages - cir - start - end - (swag [start offset] u.envs) - == + =/ jon + %- msg-to-json + :* %messages + cir + start + end + (swag [start offset] u.envs) + == :_ this [ost.bol %http-response (json-response:app (json-to-octs jon))]~ :: diff --git a/pkg/interface/chat/src/js/components/root.js b/pkg/interface/chat/src/js/components/root.js index cbf1fb115..8fc099fe5 100644 --- a/pkg/interface/chat/src/js/components/root.js +++ b/pkg/interface/chat/src/js/components/root.js @@ -36,7 +36,7 @@ export class Root extends Component { let configs = !!state.configs ? state.configs : {}; let circles = Object.keys(configs).filter((conf) => { - return !!configs[conf] && conf.split('/')[1] !== 'i'; + return configs[conf] !== undefined && conf.split('/')[1] !== 'i'; }); let messages = _.get(state, 'messages', {}); @@ -87,7 +87,7 @@ export class Root extends Component { inviteConfig = configs[`~${window.ship}/i`]; } - const renderChannelsSidebar = (props) => ( + const renderChannelSidebar = (props) => ( { return ( + sidebar={renderChannelSidebar(props)}>

Home

@@ -124,7 +124,7 @@ export class Root extends Component { return ( + sidebar={renderChannelSidebar(props)}> { return ( + sidebar={renderChannelSidebar(props)}> + sidebar={renderChannelSidebar(props) }> { return ( + sidebar={renderChannelSidebar(props) }> + sidebar={renderChannelSidebar(props) }>