MDL-68070 messaging: Ensure that error is shown on first messages
commit9fad671e5dce5267be8552a6fd2dfd9ec3ec1e1c
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 14 Oct 2020 09:22:23 +0000 (14 11:22 +0200)
committerSara Arjona <sara@moodle.com>
Wed, 14 Oct 2020 16:58:00 +0000 (14 18:58 +0200)
tree9a448853439542dd68471a7fd3360ab02dea14c3
parent2020abe0d86891f63a1af0970fdd7d8366eaa60c
MDL-68070 messaging: Ensure that error is shown on first messages

Before there is a conversation, messages between users are sent
using core_message_send_instant_messages instead of
core_message_send_messages_to_conversation.

That method had an undefined $errormessage variable, ultimately
causing the problem detected on message_post_message()/message_send()
to never been returned by the external.

This just adds the same error than already existing conversations do,
but returning it as warning, for BC, JS will show it.
message/externallib.php