notifications: render post notifications
@@ -25,6 +25,9 @@ function getGraphModuleIcon(module: string) {
if (module === 'link') {
return 'Collection';
}
+ if(module === 'post') {
+ return 'Groups';
+ }
return _.capitalize(module);
}
@@ -38,6 +41,8 @@ const FilterBox = styled(Box)`
function describeNotification(description: string, plural: boolean): string {
switch (description) {
+ case 'post':
+ return 'replied to you';
case 'link':
return `added ${pluralize('new link', plural)} to`;
case 'comment':
@@ -117,6 +122,9 @@ const GraphNodeContent = ({
);
}
}
+ if(mod === 'post') {
+ return <MentionText content={contents} group={group} />;
+ }
if (mod === 'chat') {
return (
@@ -166,6 +174,9 @@ function getNodeUrl(
return `${graphUrl}/${linkId}`;
} else if (mod === 'chat') {
return graphUrl;
+ } else if( mod === 'post') {
+ const [last, ...rest] = idx.reverse();
+ return `/~landscape${groupPath}/feed/${rest.join('/')}?post=${last}`;
}
return '';
}
