Skip to content

Conversation

@HoonBaek
Copy link
Contributor

@HoonBaek HoonBaek commented Mar 31, 2023

Description Of Changes

  • Do not check threadInfo to improve the parent message, because every normal messages potentially can be a parent message
  • The type of messageId should be the number

@HoonBaek HoonBaek requested a review from sravan-s March 31, 2023 07:36
@HoonBaek HoonBaek self-assigned this Mar 31, 2023
@HoonBaek HoonBaek requested a review from AhyoungRyu March 31, 2023 07:37
return (
message?.parentMessage !== null
&& message?.parentMessageId !== null
&& message?.parentMessageId
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add unit test before merge pls

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're sure about its type is number and want to keep a strict way like before, you can do this too.

Suggested change
&& message?.parentMessageId
&& typeof message?.parentMessageId === 'number' // do we have this kind of util fcuntion?

or

Suggested change
&& message?.parentMessageId
&& !isNaN(message?.parentMessageId)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's sure that the type of parentMessaeId is number, so I wanted to check if it's 0 or more

@HoonBaek HoonBaek merged commit 94249e2 into main Mar 31, 2023
@HoonBaek HoonBaek deleted the fix/Modify-condition-of-checking-parent-and-thread-message branch March 31, 2023 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants