Repository navigation
Adding UserTeam, SourceTeam, DisplayAsBot, MediaDisplayType and HasMoreShares to File - #270
Merged
soxtoby merged 1 commit intoNov 1, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Filedoesn't carry five fields that Slack's file object andfiles.infodocumentation show. I found them comparing a realfiles.inforesponse withFile: four of them are in it. My app doesn't read any of them through a workaround today. This models them. It is one commit.UserTeam(user_team): "Team of the user who created the file.", the file's counterpart ofUserTeamon message events from Adding PreviousMessage to MessageDeleted, UserTeam and SourceTeam to message events, and MetadataJson to MessageUpdate #264.SourceTeam(source_team): "Team where the file originated."HasMoreShares(has_more_shares): "Whether there are additional shares not returned.", next toSkippedShares.MediaDisplayType(media_display_type): "How the media should be displayed."DisplayAsBot(display_as_bot), the same propertyMessageEventBasehas. The reference shows it in thefiles.infoexample without describing it, so it has no doc comment.Compatibility
Additive only. The new properties default to null or false.
Testing
New
FileTests: a file withuser_teamandsource_team, one with the other three fields, and one with none of them../do testpasses (786 tests).Seen in a real response:
user_team,has_more_shares,media_display_typeanddisplay_as_bot.Not verified:
source_team. I haven't seen it in a real response, so it follows the reference only. The same real response hasis_modified_by_ai, which I left out: it isn't in the reference (which hasai_generated, and SlackNet hasIsAiSuggested), so there is no Slack wording to copy. I also haven't run my app against a local pack of this branch.