mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-10 19:57:43 +02:00
Move notifications to person spaces (#6263)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
@@ -543,11 +543,15 @@ export class GithubWorker implements IntegrationManager {
|
||||
if (accountRef !== undefined) {
|
||||
const person = await this.client.findOne(contact.class.Person, { _id: accountRef.person })
|
||||
if (person !== undefined) {
|
||||
await createNotification(this._client, person, {
|
||||
user: account,
|
||||
message: github.string.AuthenticatedWithGithubRequired,
|
||||
props: {}
|
||||
})
|
||||
const personSpace = await this.client.findOne(contact.class.PersonSpace, { person: person._id })
|
||||
if (personSpace !== undefined) {
|
||||
await createNotification(this._client, person, {
|
||||
user: account,
|
||||
space: personSpace._id,
|
||||
message: github.string.AuthenticatedWithGithubRequired,
|
||||
props: {}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
this.ctx.info('get octokit: return bot', { account })
|
||||
|
||||
Reference in New Issue
Block a user