mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 11:33:41 +03:00
Merge pull request #2394 from urbit/mp/os1/chat/contact-polling
chat: pull room contacts from associated group
This commit is contained in:
commit
f457c0e568
@ -45,12 +45,13 @@ export class Root extends Component {
|
|||||||
state.invites['/chat'] : {};
|
state.invites['/chat'] : {};
|
||||||
|
|
||||||
let contacts = !!state.contacts ? state.contacts : {};
|
let contacts = !!state.contacts ? state.contacts : {};
|
||||||
|
let associations = !!state.associations ? state.associations : new Map;
|
||||||
|
|
||||||
const renderChannelSidebar = (props, station) => (
|
const renderChannelSidebar = (props, station) => (
|
||||||
<Sidebar
|
<Sidebar
|
||||||
inbox={state.inbox}
|
inbox={state.inbox}
|
||||||
messagePreviews={messagePreviews}
|
messagePreviews={messagePreviews}
|
||||||
associations={state.associations || new Map}
|
associations={associations}
|
||||||
contacts={contacts}
|
contacts={contacts}
|
||||||
invites={invites}
|
invites={invites}
|
||||||
unreads={unreads}
|
unreads={unreads}
|
||||||
@ -152,8 +153,14 @@ export class Root extends Component {
|
|||||||
envelopes: []
|
envelopes: []
|
||||||
};
|
};
|
||||||
|
|
||||||
let roomContacts = (station in contacts)
|
let roomContacts = {};
|
||||||
? contacts[station] : {};
|
let associatedGroup = ((associations.has(station)) &&
|
||||||
|
(associations.get(station)["group-path"]))
|
||||||
|
? associations.get(station)["group-path"] : "";
|
||||||
|
|
||||||
|
if ((associations.has(station)) && (associatedGroup in contacts)) {
|
||||||
|
roomContacts = contacts[associatedGroup]
|
||||||
|
}
|
||||||
|
|
||||||
let group = state.groups[station] || new Set([]);
|
let group = state.groups[station] || new Set([]);
|
||||||
let popout = props.match.url.includes("/popout/");
|
let popout = props.match.url.includes("/popout/");
|
||||||
@ -240,9 +247,8 @@ export class Root extends Component {
|
|||||||
|
|
||||||
let popout = props.match.url.includes("/popout/");
|
let popout = props.match.url.includes("/popout/");
|
||||||
|
|
||||||
let association = ((state.associations) &&
|
let association = (associations.has(station))
|
||||||
(state.associations.has(station)))
|
? associations.get(station) : {};
|
||||||
? state.associations.get(station) : {};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Skeleton
|
<Skeleton
|
||||||
|
Loading…
Reference in New Issue
Block a user