Move notifications to person spaces (#6263)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina
2024-08-06 16:44:23 +07:00
committed by GitHub
parent b997b0c753
commit 1c1d0bc538
52 changed files with 729 additions and 500 deletions
+9 -5
View File
@@ -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 })