mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-10 17:30:51 +00:00
uberf-9670: fix reply avatars (#8302)
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
parent
a3d9aac42a
commit
ff6cd9db64
@ -80,10 +80,12 @@ export async function getAllSocialStringsByPersonId (
|
||||
}
|
||||
|
||||
export async function getPerson (control: TriggerControl, personId: PersonId): Promise<Person | undefined> {
|
||||
const socialId = (await control.findAll(control.ctx, contact.class.SocialIdentity, { key: personId }))[0]
|
||||
const socialId = (
|
||||
await control.findAll(control.ctx, contact.class.SocialIdentity, { _id: personId as SocialIdentityRef })
|
||||
)[0]
|
||||
|
||||
if (socialId === undefined) {
|
||||
control.ctx.error('Cannot find social id', { key: personId })
|
||||
control.ctx.error('Cannot find social id', { _id: personId })
|
||||
return undefined
|
||||
}
|
||||
|
||||
@ -114,7 +116,9 @@ export async function getPersonsBySocialIds (
|
||||
}
|
||||
|
||||
export async function getEmployee (control: TriggerControl, personId: PersonId): Promise<Employee | undefined> {
|
||||
const socialId = (await control.findAll(control.ctx, contact.class.SocialIdentity, { key: personId }))[0]
|
||||
const socialId = (
|
||||
await control.findAll(control.ctx, contact.class.SocialIdentity, { _id: personId as SocialIdentityRef })
|
||||
)[0]
|
||||
const employee = (
|
||||
await control.findAll(
|
||||
control.ctx,
|
||||
|
Loading…
Reference in New Issue
Block a user