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'] : {};
|
||||
|
||||
let contacts = !!state.contacts ? state.contacts : {};
|
||||
let associations = !!state.associations ? state.associations : new Map;
|
||||
|
||||
const renderChannelSidebar = (props, station) => (
|
||||
<Sidebar
|
||||
inbox={state.inbox}
|
||||
messagePreviews={messagePreviews}
|
||||
associations={state.associations || new Map}
|
||||
associations={associations}
|
||||
contacts={contacts}
|
||||
invites={invites}
|
||||
unreads={unreads}
|
||||
@ -152,8 +153,14 @@ export class Root extends Component {
|
||||
envelopes: []
|
||||
};
|
||||
|
||||
let roomContacts = (station in contacts)
|
||||
? contacts[station] : {};
|
||||
let roomContacts = {};
|
||||
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 popout = props.match.url.includes("/popout/");
|
||||
@ -240,9 +247,8 @@ export class Root extends Component {
|
||||
|
||||
let popout = props.match.url.includes("/popout/");
|
||||
|
||||
let association = ((state.associations) &&
|
||||
(state.associations.has(station)))
|
||||
? state.associations.get(station) : {};
|
||||
let association = (associations.has(station))
|
||||
? associations.get(station) : {};
|
||||
|
||||
return (
|
||||
<Skeleton
|
||||
|
Loading…
Reference in New Issue
Block a user