()
| 444 | return true; |
| 445 | } |
| 446 | const identifyAccount = async () => { |
| 447 | Analytics.linkAnalyticsAccount({ |
| 448 | answerOverflowAccountId: user.id, |
| 449 | otherId: account.providerAccountId, |
| 450 | }); |
| 451 | if (account?.provider === 'discord' && account?.access_token) { |
| 452 | const discordAccount = await getDiscordUser({ |
| 453 | accessToken: account.access_token, |
| 454 | }); |
| 455 | Analytics.identifyDiscordAccount(user.id, { |
| 456 | id: discordAccount.id, |
| 457 | username: discordAccount.username, |
| 458 | email: discordAccount.email ?? '', |
| 459 | }); |
| 460 | } |
| 461 | return Analytics.finishAnalyticsCollection(); |
| 462 | }; |
| 463 | const updateAccountInfo = async () => { |
| 464 | const foundAccount = await findAccountByProviderAccountId({ |
| 465 | provider: account.provider, |
no test coverage detected