UBERF-9714: Support subsecutive meeting joins (#8421)

* uberf-9714: support subsecutive meeting joins
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

* uberf-9714: fix unit test
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
Alexey Zinoviev 2025-04-01 18:43:53 +04:00 committed by GitHub
parent addd09cc52
commit 0341b69395
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 20 additions and 16 deletions

View File

@ -244,6 +244,7 @@ describe('AccountPostgresDbCollection', () => {
a.uuid,
a.timezone,
a.locale,
a.automatic,
p.hash,
p.salt
FROM global_account.account as a

View File

@ -316,6 +316,7 @@ export class AccountPostgresDbCollection
a.uuid,
a.timezone,
a.locale,
a.automatic,
p.hash,
p.salt
FROM ${this.getTableName()} as a

View File

@ -766,27 +766,29 @@ export async function checkAutoJoin (
if (emailSocialId != null) {
const targetAccount = await getAccount(db, emailSocialId.personUuid)
if (targetAccount != null) {
if (token == null) {
// Login required
const person = await db.person.findOne({ uuid: targetAccount.uuid })
if (targetAccount.automatic == null || !targetAccount.automatic) {
if (token == null) {
// Login required
const person = await db.person.findOne({ uuid: targetAccount.uuid })
return {
workspace: workspace.uuid,
name: person == null ? '' : getPersonName(person),
email: normalizedEmail
return {
workspace: workspace.uuid,
name: person == null ? '' : getPersonName(person),
email: normalizedEmail
}
}
}
const { account: callerAccount } = decodeTokenVerbose(ctx, token)
const { account: callerAccount } = decodeTokenVerbose(ctx, token)
if (callerAccount !== targetAccount.uuid) {
// Login with target email required
const person = await db.person.findOne({ uuid: targetAccount.uuid })
if (callerAccount !== targetAccount.uuid) {
// Login with target email required
const person = await db.person.findOne({ uuid: targetAccount.uuid })
return {
workspace: workspace.uuid,
name: person == null ? '' : getPersonName(person),
email: normalizedEmail
return {
workspace: workspace.uuid,
name: person == null ? '' : getPersonName(person),
email: normalizedEmail
}
}
}