Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

MXMediaManager/MXMediaLoader: Do not allow non-mxc content URLs #487

Merged
merged 5 commits into from
Nov 13, 2018

Conversation

giomfo
Copy link
Member

@giomfo giomfo commented Nov 11, 2018

Improvements:

Deprecated API:

  • MXKAttachment: the properties "actualURL" and "thumbnailURL" are deprecated because only Matrix Content URI should be considered now.
  • MXKAttachment: the property "cacheThumbnailPath" is deprecated, use "thumbnailCachePath" instead.
  • MXKAttachment: [initWithEvent:andMatrixSession:] is deprecated, use [initWithEvent:andMediaManager:] instead.
  • MXKImageView: [setImageURL:withType:andImageOrientation:previewImage:] is deprecated, use [setImageURI:withType:andImageOrientation:previewImage:mediaManager] or [setImageURI:withType:andImageOrientation:toFitViewSize:withMethod:previewImage:mediaManager] instead.
  • MXKReceiptSendersContainer: the property "restClient" is deprecated.
  • MXKReceiptSendersContainer: [initWithFrame:andRestClient:] is deprecated, use [initWithFrame:andMediaManager:] instead.

Deprecate some MXKAttachment interfaces (actualURL..) because only Matrix Content URI should be considered now.
Deprecate the MXKImageView "setImageURL:" interface for the same reason.
… to fit a specific view size.

CAUTION: this method is available only for the unencrypted content.
Copy link
Contributor

@manuroe manuroe left a comment

Choose a reason for hiding this comment

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

LGTM but could we remove all deprecated methods, please?
That will help to maintain it later.

@giomfo giomfo merged commit dbb5140 into develop Nov 13, 2018
@giomfo giomfo deleted the media_refacto branch November 13, 2018 16:43
giomfo added a commit to tchapgouv/tchap-ios that referenced this pull request Nov 14, 2018
Improvements:
 * Replace the deprecated MXMediaManager and MXMediaLoader interfaces use (see matrix-org/matrix-ios-sdk/pull/593).
 * Replace the deprecated MXKAttachment and MXKImageView interfaces use (see matrix-org/matrix-ios-kit/pull/487).
 * Server Quota Notices: Implement the blue banner (1937).
 * Lazy loading: Enable it by default (if the homeserver supports it).
 * i18n: Add Spanish (sp).
 * Settings: Make advanced info copyable (2023).
 * Settings: Made cryptography info copyable, thanks to @daverPL (PR 1999).

Bug fix:
 * Notifications: old notifications can reappear (1985).
 * Fix missing read receipts when lazy-loading room members.
 * Weird text color when selecting a message (2046).
 * Fix input toolbar reset in RoomViewController on MXSession state change (2006 and 2008).
 * User defaults: the preset application language (if any) is ignored.
 * Recents: Avoid to open a room twice (it crashed on room creation on quick HSes).
 * Riot-bot: Do not try to create a room with it if the user homeserver is not federated.
 * Empty app if initial /sync fails (1975).
 * Fix possible race conditions in direct rooms management.
giomfo added a commit to tchapgouv/tchap-ios that referenced this pull request Nov 14, 2018
* Rebase onto vector-im/riot-ios:

Improvements:
 * Replace the deprecated MXMediaManager and MXMediaLoader interfaces use (see matrix-org/matrix-ios-sdk/pull/593).
 * Replace the deprecated MXKAttachment and MXKImageView interfaces use (see matrix-org/matrix-ios-kit/pull/487).
 * Server Quota Notices: Implement the blue banner (1937).
 * Lazy loading: Enable it by default (if the homeserver supports it).
 * i18n: Add Spanish (sp).
 * Settings: Make advanced info copyable (2023).
 * Settings: Made cryptography info copyable, thanks to @daverPL (PR 1999).

Bug fix:
 * Notifications: old notifications can reappear (1985).
 * Fix missing read receipts when lazy-loading room members.
 * Weird text color when selecting a message (2046).
 * Fix input toolbar reset in RoomViewController on MXSession state change (2006 and 2008).
 * User defaults: the preset application language (if any) is ignored.
 * Recents: Avoid to open a room twice (it crashed on room creation on quick HSes).
 * Riot-bot: Do not try to create a room with it if the user homeserver is not federated.
 * Empty app if initial /sync fails (1975).
 * Fix possible race conditions in direct rooms management.

- Remove deprecated MXKImageView interface use
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants