Skip to content

Apply the changes detected by integration tests (2020-05-19, PT)#460

Merged
seratch merged 2 commits intoslackapi:masterfrom
seratch:integration-tests-2020-05-20
May 20, 2020
Merged

Apply the changes detected by integration tests (2020-05-19, PT)#460
seratch merged 2 commits intoslackapi:masterfrom
seratch:integration-tests-2020-05-20

Conversation

@seratch
Copy link
Copy Markdown
Contributor

@seratch seratch commented May 20, 2020

Summary

Most parts in this pull request are test code updates but this is going to apply some changes to library code as below:

  • Mark as_user parameter as deprecated for chat.postMessage calls (the server-side returns deprecation warnings to it when using it with bot tokens)
  • Add newly added fields in responses
    • message.root.parete_user_id
    • message.root.icons

Requirements (place an x in each [ ])

1) Mark as_user parameter as deprecated for chat.postMessage calls (the server-side returns deprecation warnings to it when using it with bot tokens.
2) Add newly added fields in responses: message.root.parete_user_id, message.root.icons
@seratch seratch added this to the 1.0.x milestone May 20, 2020
.threadTs(firstMessageCreation.getTs())
);
assertThat(reply1.getError(), is("invalid_arguments"));
assertThat(reply1.getDeprecatedArgument(), is("as_user"));
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This error response indicates that as_user won't be available for any cases. If a Slack app needs to post a message on behalf of a user, the app can use the person's user token, not a bot token.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2020

Codecov Report

Merging #460 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #460   +/-   ##
=========================================
  Coverage     83.65%   83.65%           
  Complexity     2387     2387           
=========================================
  Files           250      250           
  Lines          6442     6442           
  Branches        590      590           
=========================================
  Hits           5389     5389           
  Misses          690      690           
  Partials        363      363           
Impacted Files Coverage Δ Complexity Δ
...i/methods/request/chat/ChatPostMessageRequest.java 33.33% <ø> (ø) 1.00 <0.00> (ø)
...del/src/main/java/com/slack/api/model/Message.java 100.00% <ø> (ø) 0.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 15c0baf...171bd18. Read the comment docs.

"team_id": "T00000000",
"enterprise_id": "E00000000",
"api_app_id": "A00000000",
"team_id": "",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This used to be relying on my local assets. Now everyone can generate the same sample JSON files if they properly set up test workspaces.

@seratch seratch merged commit c35cd73 into slackapi:master May 20, 2020
@seratch seratch deleted the integration-tests-2020-05-20 branch May 20, 2020 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant