mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 03:14:40 +03:00
fix: get rid of NOTIFY_INBOX_ONLY env variable (#6592)
This commit is contained in:
parent
fada0c4718
commit
17e1013213
3
.vscode/launch.json
vendored
3
.vscode/launch.json
vendored
@ -128,10 +128,9 @@
|
||||
"MINIO_ACCESS_KEY": "minioadmin",
|
||||
"MINIO_SECRET_KEY": "minioadmin",
|
||||
"MINIO_ENDPOINT": "localhost",
|
||||
"MODEL_VERSION": "v0.6.286",
|
||||
"MODEL_VERSION": "v0.6.286"
|
||||
// "INIT_SCRIPT_URL": "https://raw.githubusercontent.com/hcengineering/init/main/script.yaml",
|
||||
// "INIT_WORKSPACE": "onboarding",
|
||||
"NOTIFY_INBOX_ONLY": "true"
|
||||
},
|
||||
"runtimeVersion": "20",
|
||||
"runtimeArgs": ["--nolazy", "-r", "ts-node/register"],
|
||||
|
@ -110,7 +110,6 @@ services:
|
||||
- MODEL_ENABLED=*
|
||||
- ACCOUNTS_URL=http://host.docker.internal:3000
|
||||
- BRANDING_PATH=/var/cfg/branding.json
|
||||
- NOTIFY_INBOX_ONLY=true
|
||||
# - PARALLEL=2
|
||||
# - INIT_SCRIPT_URL=https://raw.githubusercontent.com/hcengineering/init/main/script.yaml
|
||||
# - INIT_WORKSPACE=onboarding
|
||||
|
@ -75,7 +75,6 @@ services:
|
||||
- MODEL_ENABLED=*
|
||||
- ACCOUNTS_URL=http://account:3003
|
||||
- BRANDING_PATH=/var/cfg/branding.json
|
||||
- NOTIFY_INBOX_ONLY=true
|
||||
restart: unless-stopped
|
||||
front:
|
||||
image: hardcoreeng/front
|
||||
|
@ -200,7 +200,7 @@ export async function isShouldNotifyTx (
|
||||
const result = new Map<Ref<NotificationProvider>, BaseNotificationType[]>()
|
||||
let providers: NotificationProvider[] = control.modelDb.findAllSync(notification.class.NotificationProvider, {})
|
||||
|
||||
if (process.env.NOTIFY_INBOX_ONLY === 'true') {
|
||||
if (getMetadata(serverNotification.metadata.InboxOnlyNotifications) === true) {
|
||||
providers = providers.filter((it) => it._id === notification.providers.InboxNotificationProvider)
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,8 @@ export default plugin(serverNotificationId, {
|
||||
metadata: {
|
||||
SesUrl: '' as Metadata<string>,
|
||||
PushPrivateKey: '' as Metadata<string>,
|
||||
PushSubject: '' as Metadata<string>
|
||||
PushSubject: '' as Metadata<string>,
|
||||
InboxOnlyNotifications: '' as Metadata<boolean>
|
||||
},
|
||||
class: {
|
||||
NotificationProviderResources: '' as Ref<Class<NotificationProviderResources>>
|
||||
|
@ -54,6 +54,7 @@
|
||||
"@hcengineering/server-pipeline": "^0.6.0",
|
||||
"@hcengineering/server-client": "^0.6.0",
|
||||
"@hcengineering/server-token": "^0.6.11",
|
||||
"@hcengineering/server-notification": "^0.6.1",
|
||||
"@hcengineering/analytics": "^0.6.0"
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ import {
|
||||
import { type MigrateOperation } from '@hcengineering/model'
|
||||
import { setMetadata } from '@hcengineering/platform'
|
||||
import serverClientPlugin from '@hcengineering/server-client'
|
||||
import serverNotification from '@hcengineering/server-notification'
|
||||
import serverToken from '@hcengineering/server-token'
|
||||
import toolPlugin from '@hcengineering/server-tool'
|
||||
import { WorkspaceWorker } from './service'
|
||||
@ -100,6 +101,8 @@ export function serveWorkspaceAccount (
|
||||
}
|
||||
setMetadata(serverClientPlugin.metadata.UserAgent, 'WorkspaceService')
|
||||
|
||||
setMetadata(serverNotification.metadata.InboxOnlyNotifications, true)
|
||||
|
||||
const worker = new WorkspaceWorker(
|
||||
version,
|
||||
txes,
|
||||
|
@ -70,7 +70,6 @@ services:
|
||||
- MODEL_ENABLED=*
|
||||
- ACCOUNTS_URL=http://account:3003
|
||||
- BRANDING_PATH=/var/cfg/branding.json
|
||||
- NOTIFY_INBOX_ONLY=true
|
||||
restart: unless-stopped
|
||||
front:
|
||||
image: hardcoreeng/front
|
||||
|
Loading…
Reference in New Issue
Block a user