Merge pull request #3922 from urbit/mp/hark/remote-content

hark: pass remotecontentpolicy to chat notifications
This commit is contained in:
matildepark 2020-11-12 10:42:04 -05:00 committed by GitHub
commit 942c6bd8f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 3 deletions

View File

@ -34,8 +34,9 @@ export function ChatNotification(props: {
contacts: Rolodex;
groups: Groups;
api: GlobalApi;
remoteContentPolicy: any;
}) {
const { index, contents, read, time, api, timebox } = props;
const { index, contents, read, time, api, timebox, remoteContentPolicy } = props;
const authors = _.map(contents, "author");
const { chat, mention } = index;
@ -86,6 +87,7 @@ export function ChatNotification(props: {
contacts={groupContacts}
fontSize='0'
pt='2'
remoteContentPolicy={remoteContentPolicy}
/>
</Link>
);

View File

@ -87,9 +87,9 @@ export function Header(props: {
{!!moduleIcon && <Icon icon={moduleIcon as any} />}
{!!channel && <Text fontWeight="500">{channelTitle}</Text>}
<Rule vertical height="12px" />
{groupTitle &&
{groupTitle &&
<>
<Text fontWeight="500">{groupTitle}</Text>}
<Text fontWeight="500">{groupTitle}</Text>
<Rule vertical height="12px"/>
</>
}

View File

@ -134,6 +134,7 @@ export default function Inbox(props: {
graphConfig={props.notificationsGraphConfig}
groupConfig={props.notificationsGroupConfig}
chatConfig={props.notificationsChatConfig}
remoteContentPolicy={props.remoteContentPolicy}
api={api}
/>
)}
@ -153,6 +154,7 @@ export default function Inbox(props: {
graphConfig={props.notificationsGraphConfig}
groupConfig={props.notificationsGroupConfig}
chatConfig={props.notificationsChatConfig}
remoteContentPolicy={props.remoteContentPolicy}
/>
)
)}
@ -182,6 +184,7 @@ function DaySection({
groupConfig,
graphConfig,
chatConfig,
remoteContentPolicy
}) {
const calendar = latest
? MOMENT_CALENDAR_DATE
@ -216,6 +219,7 @@ function DaySection({
contacts={contacts}
groups={groups}
time={date}
remoteContentPolicy={remoteContentPolicy}
/>
</React.Fragment>
))

View File

@ -31,6 +31,7 @@ interface NotificationProps {
graphConfig: NotificationGraphConfig;
groupConfig: GroupNotificationsConfig;
chatConfig: string[];
remoteContentPolicy: any;
}
function getMuted(
@ -180,6 +181,7 @@ export function Notification(props: NotificationProps) {
timebox={props.time}
time={time}
associations={associations}
remoteContentPolicy={props.remoteContentPolicy}
/>
</Wrapper>
);