Skip to content

Adding UserTeam, SourceTeam, DisplayAsBot, MediaDisplayType and HasMoreShares to File - #270

Merged
soxtoby merged 1 commit into
soxtoby:masterfrom
we4sz:file-user-team-and-media-display-type
Nov 1, 2026
Merged

soxtoby merged 1 commit into
soxtoby:masterfrom
we4sz:file-user-team-and-media-display-type

Conversation

@we4sz

@we4sz we4sz commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

File doesn't carry five fields that Slack's file object and files.info documentation show. I found them comparing a real files.info response with File: 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.

  1. UserTeam (user_team): "Team of the user who created the file.", the file's counterpart of UserTeam on message events from Adding PreviousMessage to MessageDeleted, UserTeam and SourceTeam to message events, and MetadataJson to MessageUpdate #264.
  2. SourceTeam (source_team): "Team where the file originated."
  3. HasMoreShares (has_more_shares): "Whether there are additional shares not returned.", next to SkippedShares.
  4. MediaDisplayType (media_display_type): "How the media should be displayed."
  5. DisplayAsBot (display_as_bot), the same property MessageEventBase has. The reference shows it in the files.info example 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 with user_team and source_team, one with the other three fields, and one with none of them. ./do test passes (786 tests).

Seen in a real response: user_team, has_more_shares, media_display_type and display_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 has is_modified_by_ai, which I left out: it isn't in the reference (which has ai_generated, and SlackNet has IsAiSuggested), so there is no Slack wording to copy. I also haven't run my app against a local pack of this branch.

@soxtoby
soxtoby merged commit f31addc into soxtoby:master Nov 1, 2026
1 check passed
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