-
Notifications
You must be signed in to change notification settings - Fork 68
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
🙉 Do not notify of own posts in own threads #4746
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Two small nitpicks, otherwise LGTM
|
||
const mentionedMemberIds = difference(getMentionedMemberIds(post.text), [authorId]) | ||
const repliedToMemberIds = difference([Number(post.repliesTo?.authorId)], [NaN, authorId]) | ||
const mentionedMemberIds = difference(getMentionedMemberIds(post.text)) |
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.
difference
call not needed anymore
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.
Nice catch
generalEvent('FORUM_POST_MENTION', mentionedMemberIds), | ||
generalEvent('FORUM_POST_REPLY', repliedToMemberIds), | ||
generalEvent('FORUM_THREAD_CREATOR', [Number(post.thread.authorId)]), | ||
generalEvent('FORUM_POST_REPLY', repliedToMemberId ?? []), |
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.
Maybe safer to do || []
in case repliedToMemberId
is somehow NaN
?
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.
repliedToMemberId
is [number] | null | undefined
so ??
should be good here
No description provided.