Skip to content

Conversation

@Yang-33
Copy link
Contributor

@Yang-33 Yang-33 commented Apr 3, 2025

The structure itself was completely wrong...
This change modifies tests to use both the hash and the SDK class, and also to verify the body using WebMock.

@Yang-33 Yang-33 self-assigned this Apr 3, 2025
@Yang-33 Yang-33 closed this Apr 3, 2025
@Yang-33 Yang-33 reopened this Apr 3, 2025
@Yang-33 Yang-33 requested a review from a team April 3, 2025 07:30
Comment on lines +397 to +400
request = {
"to" => "USER_ID",
"messages" => [{ type: 'text', text: ' Hello, world! ' }]
}
Copy link
Contributor Author

@Yang-33 Yang-33 Apr 3, 2025

Choose a reason for hiding this comment

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

this (without using Line::Bot::V2::MessagingApi::PushMessageRequest) is acceptable as of now.

Q: I'm not sure if it's intentional. Is this intentional? @mokuzon

Copy link
Contributor

Choose a reason for hiding this comment

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

It is not my intention to do so, but I do get a warning from RBS.
Since we do not strictly implement type checking, I think this is an unavoidable behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the reply. Since it wasn't intentional, let's remove the current behavior from the spec (i.e., don't explicitly mention it in the documentation, but leave the code as is). On the other hand, I thought that v1 users might appreciate this behavior when migrating to v2, as it makes the migration process much simpler. There's no need to actively rewrite the request object.

If, in the future, this behavior becomes problematic for any SDK users, we can discontinue the current behavior.

@Yang-33 Yang-33 merged commit d597e02 into line:master Apr 3, 2025
6 checks passed
@Yang-33 Yang-33 deleted the fix-test-3 branch April 3, 2025 14:03
@Yang-33
Copy link
Contributor Author

Yang-33 commented Apr 8, 2025

#365

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants