uberf-9670: fix reply avatars (#8302)

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
Alexey Zinoviev 2025-03-20 19:30:43 +04:00 committed by GitHub
parent a3d9aac42a
commit ff6cd9db64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,