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

MSC2582: Remove mimetype from EncryptedFile object #2582

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions proposals/2582-remove-mimetype-from-encrypted-file.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Remove `mimetype` from `EncryptedFile` object


## Proposal
The example in the spec currently lists `mimetype` in the examples for `EncryptedFile` but not in
Sorunome marked this conversation as resolved.
Show resolved Hide resolved
the object definition. As that is duplicate information of the `info` block of file events, the
uhoreg marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Just to note that the EncryptedFile appears twice in the examples: in the file property (top-level) and it info.thumbnail_file. mimetype is given in both places.

mimetype should just be removed alltogether.


## Potential issues
Some clients might depend on this?
Copy link
Member

@uhoreg uhoreg May 27, 2020

Choose a reason for hiding this comment

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

TODO: check client support

(I will update this list as we determine what changes are needed for clients.)

(in alphabetical order)

  • fluffychat
  • gomuks
  • nheko
  • nio SDK
    • weechat-matrix (does not seem to use anything)
    • mirage
  • Riot Element Android
  • Riot Element iOS
  • Riot Element Web
    • the decryptFile function only gets passed the file property from the contents. To fix this, we'd need to either pass both the file and info properties, or the entire contents.
  • rust sdk (does not seem to do any mimetype processing on its own)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fluffychat doesn't seem to depend on this, either

Copy link
Member

Choose a reason for hiding this comment

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

Element Android dropped this field in element-hq/element-android#3273. Element iOS in matrix-org/matrix-ios-sdk#1125. The open issue for Element Web is element-hq/element-web#17145.

Copy link
Member

Choose a reason for hiding this comment

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

Element no longer uses this field, and uses the mimetype from the info field: matrix-org/matrix-react-sdk#6591 (It will still send the field for now, but that's less important for this MSC)

Copy link
Member

@uhoreg uhoreg Aug 10, 2021

Choose a reason for hiding this comment

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

@tulir do you know what gomuks does? Also, any of your bridges.

Copy link
Member

Choose a reason for hiding this comment

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

My libraries don't support that field at all

Copy link
Member

Choose a reason for hiding this comment

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

OK, so it seems like all clients don't use the undocumented field any more, so I think it this potential issue is no longer an issue.

Sorunome marked this conversation as resolved.
Show resolved Hide resolved