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

Fix #926 by adding more subtype ones to message event types #928

Merged
merged 2 commits into from
May 20, 2021

Conversation

seratch
Copy link
Member

@seratch seratch commented May 19, 2021

Summary

This pull request resolves #926

Requirements (place an x in each [ ])

@seratch seratch added bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented enhancement M-T: A feature request for new functionality semver:minor TypeScript-specific labels May 19, 2021
@seratch seratch added this to the 3.4.0 milestone May 19, 2021
@seratch seratch self-assigned this May 19, 2021
@codecov
Copy link

codecov bot commented May 19, 2021

Codecov Report

Merging #928 (36e1e47) into main (5185d7b) will not change coverage.
The diff coverage is n/a.

❗ Current head 36e1e47 differs from pull request most recent head ea6a725. Consider uploading reports for the commit ea6a725 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main     #928   +/-   ##
=======================================
  Coverage   66.22%   66.22%           
=======================================
  Files          13       13           
  Lines        1205     1205           
  Branches      355      355           
=======================================
  Hits          798      798           
  Misses        338      338           
  Partials       69       69           

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 5185d7b...ea6a725. Read the comment docs.

@@ -67,6 +76,104 @@ export interface BotMessageEvent {
thread_ts?: string;
}

interface ChannelArchiveMessageEvent {
Copy link
Contributor

Choose a reason for hiding this comment

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

The other interfaces in this file are exported. Should we follow suit with the new ones, as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! Fixed.

event_ts: '',
channel_type: 'channel',
};
assert.isNotEmpty(payload);
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting. I've never seen types tested this way!

Copy link
Member Author

Choose a reason for hiding this comment

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

We can do the same in the types-tests but having these is easier. Also, we can add other kinds of tests in the same place too.

Copy link
Contributor

Choose a reason for hiding this comment

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

I defer to you on this if you think it best. Testing types is not something I'm well-versed in enough to have a strong opinion (yet!). 🙂

@seratch seratch force-pushed the issue-926-message-event-types branch from d895ce5 to ea6a725 Compare May 19, 2021 23:12
event_ts: '',
channel_type: 'channel',
};
assert.isNotEmpty(payload);
Copy link
Member Author

Choose a reason for hiding this comment

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

We can do the same in the types-tests but having these is easier. Also, we can add other kinds of tests in the same place too.

@@ -67,6 +76,104 @@ export interface BotMessageEvent {
thread_ts?: string;
}

export interface ChannelArchiveMessageEvent {
Copy link
Member Author

Choose a reason for hiding this comment

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

@misscoded Thanks for pointing the lack of export out here! Fixed.

@seratch seratch merged commit 118019d into slackapi:main May 20, 2021
@seratch seratch deleted the issue-926-message-event-types branch May 20, 2021 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented enhancement M-T: A feature request for new functionality semver:minor TypeScript-specific
Projects
None yet
Development

Successfully merging this pull request may close these issues.

file_share message subtype is missing in the message property of SlackEventMiddlewareArgs<'message'>
2 participants