Skip to content
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

Call update/remove Slack message methods without as_user param for V2 bot token #224

Merged
merged 2 commits into from
Apr 12, 2021

Conversation

zmarushchak-hs
Copy link
Contributor

Slack fails to execute method if as_user param is present and V2 bot token is used. Models updated to have the possibility to not include this param for chat.delete and chat.update methods.


@JsonProperty("ts")
public abstract String getMessageToDeleteTs();
public abstract class AbstractChatDeleteParams extends AbstractChatDeleteParamsBase {

@Default
@JsonProperty("as_user")
Copy link
Contributor

Choose a reason for hiding this comment

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

The current solution is 👍 but I wonder what do you think about annotating this property with @JsonInclude(Include.NON_DEFAULT)? This annotation says that if the value is the default we won't be serializing the property.

Copy link
Contributor Author

@zmarushchak-hs zmarushchak-hs Apr 12, 2021

Choose a reason for hiding this comment

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

Good point, didn't know about this annotation.

@zmarushchak-hs zmarushchak-hs merged commit cde7798 into master Apr 12, 2021
@zmarushchak-hs zmarushchak-hs deleted the delete-as-user branch April 12, 2021 15:12
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