MDL-78738 core_communication: Set avatar from a stored_file
commit8b97071c94887cc4682ff3ba9a9885f738955372
authorAndrew Nicols <andrew@nicols.co.uk>
Fri, 14 Jul 2023 08:24:11 +0000 (14 16:24 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Tue, 1 Aug 2023 11:50:14 +0000 (1 19:50 +0800)
tree6bba9765483b44edf78152e66e08995099089f89
parent0a5c1ea5f96e78aadb16c832227ffc624f15db74
MDL-78738 core_communication: Set avatar from a stored_file

We should always use a stored_file instance to set the avatar, and never
a data uri. Especially where the datauri is from Moodle itself.

This change requires a number of changes in associated locations.

I am not adding this change to any upgrade notes as this is a
master-only feature.

Note: I have removed some tests and will not consider fixing them
because I will be entirely removing that test file in a subsequent issue
(MDL-77917).
12 files changed:
communication/classes/api.php
communication/provider/matrix/classes/communication_feature.php
communication/provider/matrix/classes/matrix_events_manager.php
communication/provider/matrix/tests/communication_feature_test.php
communication/provider/matrix/tests/matrix_communication_test.php
communication/provider/matrix/tests/matrix_events_manager_test.php
communication/provider/matrix/tests/matrix_test_helper_trait.php
communication/tests/api_test.php
communication/tests/communication_test_helper_trait.php
communication/tests/fixtures/circle.png [new file with mode: 0644]
communication/tests/processor_test.php
course/lib.php