Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-05-31 17:44:14 +06:00 committed by GitHub
parent 0d6aa799f3
commit 13c655344a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -120,10 +120,11 @@ export function createModel (builder: Builder): void {
{ {
hidden: false, hidden: false,
objectClass: request.class.Request, objectClass: request.class.Request,
txClasses: [core.class.TxCreateDoc], txClasses: [core.class.TxCreateDoc, core.class.TxUpdateDoc],
field: 'requested',
generated: false, generated: false,
group: request.ids.RequestNotificationGroup, group: request.ids.RequestNotificationGroup,
label: request.string.Requested, label: request.string.Request,
allowedForAuthor: true, allowedForAuthor: true,
providers: { providers: {
[notification.providers.PlatformNotification]: true [notification.providers.PlatformNotification]: true
@ -136,7 +137,7 @@ export function createModel (builder: Builder): void {
builder, builder,
request.class.Request, request.class.Request,
request.ids.RequestNotificationGroup, request.ids.RequestNotificationGroup,
[], ['requested'],
['comments', 'approved', 'rejected', 'status'] ['comments', 'approved', 'rejected', 'status']
) )

View File

@ -688,7 +688,10 @@ async function getNewCollaborators (
if (ops.$push !== undefined) { if (ops.$push !== undefined) {
for (const key in ops.$push) { for (const key in ops.$push) {
if (mixin.fields.includes(key)) { if (mixin.fields.includes(key)) {
const value = (ops.$push as any)[key] let value = (ops.$push as any)[key]
if (typeof value !== 'string') {
value = value.$each
}
const newCollabs = await getKeyCollaborators(doc, value, key, control) const newCollabs = await getKeyCollaborators(doc, value, key, control)
if (newCollabs !== undefined) { if (newCollabs !== undefined) {
for (const newCollab of newCollabs) { for (const newCollab of newCollabs) {