mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-12 18:35:45 +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> {
|
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) {
|
if (socialId === undefined) {
|
||||||
control.ctx.error('Cannot find social id', { key: personId })
|
control.ctx.error('Cannot find social id', { _id: personId })
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +116,9 @@ export async function getPersonsBySocialIds (
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function getEmployee (control: TriggerControl, personId: PersonId): Promise<Employee | undefined> {
|
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 = (
|
const employee = (
|
||||||
await control.findAll(
|
await control.findAll(
|
||||||
control.ctx,
|
control.ctx,
|
||||||
|
Loading…
Reference in New Issue
Block a user