-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/missing user #4472
Fix/missing user #4472
Conversation
updatedBy: userId, | ||
userId: member.userId, | ||
// This is necessary because some test data fids do not have a corresponding farcaster profile | ||
name: member.name || '', | ||
farcasterId: member.farcasterId | ||
name: member.account.displayName || member.account.username, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@motechFR please trim these values, this wouldn't fix the name which we got, which was was " "
import { getFarcasterUsers } from '@root/lib/farcaster/getFarcasterUsers'; | ||
import { uid } from '@root/lib/utils/strings'; | ||
import { isTruthy } from '@root/lib/utils/types'; | ||
import { meanBy } from 'lodash'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accidental import?
) | ||
).filter(isTruthy); | ||
const projectMembers = await Promise.all( | ||
newProjectMembers.map(async (member) => ensureFarcasterUserExists({ fid: member.farcasterId })) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async is uneccessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
look sgood but please address whitespace usernames
WHAT
Reliably ensure we upsert farcaster user in the form
WHY