Update convex/users.ts

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
This commit is contained in:
Ian Alloway
2026-02-15 00:44:39 -05:00
committed by GitHub
parent 1d53b25aec
commit 331ba0d705
-20
View File
@@ -76,26 +76,6 @@ export const syncGitHubProfileInternal = internalMutation({
const user = await ctx.db.get(args.userId)
if (!user || user.deletedAt || user.deactivatedAt) return
const updates: Record<string, unknown> = {
name: args.name,
updatedAt: Date.now(),
}
// Update handle if it was derived from the old username
if (user.handle === user.name) {
updates.handle = args.name
}
// Update displayName if it was derived from the old username
if (user.displayName === user.name || user.displayName === user.handle) {
updates.displayName = args.name
}
// Update avatar if provided
if (args.image) {
updates.image = args.image
}
const updates: Partial<Doc<'users'>> = { githubProfileSyncedAt: args.syncedAt }
let didChangeProfile = false