mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-11 12:57:59 +00:00
Fix header of mention push (#5591)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
7b999d7b47
commit
b60067cc92
@ -38,7 +38,7 @@
|
|||||||
"Mentioned": "Mentioned",
|
"Mentioned": "Mentioned",
|
||||||
"You": "You",
|
"You": "You",
|
||||||
"Mentions": "Mentions",
|
"Mentions": "Mentions",
|
||||||
"MentionedYouIn": "Mentioned you in",
|
"MentionedYouIn": "Mentioned you in {title}",
|
||||||
"Messages": "Messages",
|
"Messages": "Messages",
|
||||||
"Thread": "Thread",
|
"Thread": "Thread",
|
||||||
"AddReaction": "Add reaction",
|
"AddReaction": "Add reaction",
|
||||||
|
@ -37,6 +37,6 @@
|
|||||||
"Mentioned": "Mencionado",
|
"Mentioned": "Mencionado",
|
||||||
"You": "Tú",
|
"You": "Tú",
|
||||||
"Mentions": "Menciones",
|
"Mentions": "Menciones",
|
||||||
"MentionedYouIn": "Has sido Mencionado en"
|
"MentionedYouIn": "Has sido Mencionado en {title}"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -37,6 +37,6 @@
|
|||||||
"Mentioned": "Mencionado",
|
"Mentioned": "Mencionado",
|
||||||
"You": "Tu",
|
"You": "Tu",
|
||||||
"Mentions": "Menções",
|
"Mentions": "Menções",
|
||||||
"MentionedYouIn": "Foste Mencionado em"
|
"MentionedYouIn": "Foste Mencionado em {title}"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -38,7 +38,7 @@
|
|||||||
"Mentioned": "Упомянул(а)",
|
"Mentioned": "Упомянул(а)",
|
||||||
"You": "Вы",
|
"You": "Вы",
|
||||||
"Mentions": "Упоминания",
|
"Mentions": "Упоминания",
|
||||||
"MentionedYouIn": "Упомянул(а) вас в",
|
"MentionedYouIn": "Упомянул(а) вас в {title}",
|
||||||
"Messages": "Cообщения",
|
"Messages": "Cообщения",
|
||||||
"Thread": "Обсуждение",
|
"Thread": "Обсуждение",
|
||||||
"AddReaction": "Добавить реакцию",
|
"AddReaction": "Добавить реакцию",
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
export let headerObject: Doc | undefined = undefined
|
export let headerObject: Doc | undefined = undefined
|
||||||
export let headerIcon: Asset | undefined = undefined
|
export let headerIcon: Asset | undefined = undefined
|
||||||
export let header: IntlString | undefined = undefined
|
export let header: IntlString | undefined = undefined
|
||||||
|
export let headerParams: Record<string, any> = {}
|
||||||
|
|
||||||
const client = getClient()
|
const client = getClient()
|
||||||
const limit = 300
|
const limit = 300
|
||||||
@ -124,7 +125,10 @@
|
|||||||
{#if !isCompact}
|
{#if !isCompact}
|
||||||
{#if headerObject}
|
{#if headerObject}
|
||||||
<DocNavLink object={headerObject} colorInherit>
|
<DocNavLink object={headerObject} colorInherit>
|
||||||
<Label label={header ?? client.getHierarchy().getClass(headerObject._class).label} />
|
<Label
|
||||||
|
label={header ?? client.getHierarchy().getClass(headerObject._class).label}
|
||||||
|
params={headerParams}
|
||||||
|
/>
|
||||||
</DocNavLink>
|
</DocNavLink>
|
||||||
{:else if person}
|
{:else if person}
|
||||||
<EmployeePresenter value={person} shouldShowAvatar={false} compact showStatus={false} />
|
<EmployeePresenter value={person} shouldShowAvatar={false} compact showStatus={false} />
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
<BasePreview
|
<BasePreview
|
||||||
headerIcon={value.headerIcon}
|
headerIcon={value.headerIcon}
|
||||||
header={value.header}
|
header={value.header}
|
||||||
|
headerParams={value.intlParams}
|
||||||
{headerObject}
|
{headerObject}
|
||||||
text={content}
|
text={content}
|
||||||
account={value.createdBy ?? value.modifiedBy}
|
account={value.createdBy ?? value.modifiedBy}
|
||||||
|
@ -304,6 +304,12 @@ async function getMessageNotifyResult (
|
|||||||
return { allowed: false, emails: [], push: false }
|
return { allowed: false, emails: [], push: false }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const mixin = control.hierarchy.as(doc, notification.mixin.Collaborators)
|
||||||
|
|
||||||
|
if (mixin === undefined || !mixin.collaborators.includes(receiver)) {
|
||||||
|
return { allowed: false, emails: [], push: false }
|
||||||
|
}
|
||||||
|
|
||||||
if (!hierarchy.isDerived(reference.attachedDocClass, activity.class.ActivityMessage)) {
|
if (!hierarchy.isDerived(reference.attachedDocClass, activity.class.ActivityMessage)) {
|
||||||
return { allowed: false, emails: [], push: false }
|
return { allowed: false, emails: [], push: false }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user