@ossy/workspaces 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/invite-user.task.js +0 -10
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ossy/workspaces",
|
|
3
3
|
"description": "Workspaces feature package - create, select, and manage workspaces, users, and invitations",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
7
7
|
"module": "./src/index.js",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"/src",
|
|
46
46
|
"README.md"
|
|
47
47
|
],
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "b045f1fd7f2fe00c776b9ea96f76083b93fd8556"
|
|
49
49
|
}
|
package/src/invite-user.task.js
CHANGED
|
@@ -5,13 +5,10 @@ import { Workspace, WorkspacesEvents } from '@ossy/workspaces/server'
|
|
|
5
5
|
import { Token, TokenEvents } from '@ossy/tokens/server'
|
|
6
6
|
import { EmailRenderer } from '@ossy/email'
|
|
7
7
|
import { ConfigService } from '@ossy/config'
|
|
8
|
-
import { createLogger } from '@ossy/observability'
|
|
9
8
|
import WorkspaceInvitationEmail, { subject as workspaceInvitationSubject } from './workspace-invitation.email.jsx'
|
|
10
9
|
|
|
11
10
|
export const metadata = { id: '@ossy/workspaces/tasks/invite-user' }
|
|
12
11
|
|
|
13
|
-
const log = createLogger('@ossy/workspaces/tasks/invite-user')
|
|
14
|
-
|
|
15
12
|
const isEmailLike = maybeEmail => /.@.+\.../.test(maybeEmail)
|
|
16
13
|
|
|
17
14
|
function createVerificationToken(workspaceId) {
|
|
@@ -72,13 +69,6 @@ export async function run({ payload, integrations, req }) {
|
|
|
72
69
|
const emailClient = integrations?.get?.('email')
|
|
73
70
|
if (emailClient) {
|
|
74
71
|
await emailClient.send({ to: email, from: 'noreply@ossy.se', subject: workspaceInvitationSubject, html, text })
|
|
75
|
-
} else if (ConfigService.BuildEnvironment === 'local') {
|
|
76
|
-
log.info('-----------YOU GOT MAIL-----------')
|
|
77
|
-
log.info(`To: ${email}`)
|
|
78
|
-
log.info(`From: noreply@ossy.se`)
|
|
79
|
-
log.info(`Subject: ${workspaceInvitationSubject}`)
|
|
80
|
-
log.info(text || html)
|
|
81
|
-
log.info('----------------------------------')
|
|
82
72
|
}
|
|
83
73
|
|
|
84
74
|
return ''
|