Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-29814 message: made html personal messages also store a plain tex…

…t version as a fallback
  • Loading branch information...
commit 878ff4057569d85bb5e0dd7d36a39e7adcc2ca42 1 parent 919e659
Andrew Davis andyjdavis authored

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 1 message/lib.php
4 message/lib.php
@@ -1944,8 +1944,10 @@ function message_post_message($userfrom, $userto, $message, $format) {
1944 1944 $eventdata->subject = get_string_manager()->get_string('unreadnewmessage', 'message', fullname($userfrom), $userto->lang);
1945 1945
1946 1946 if ($format == FORMAT_HTML) {
1947   - $eventdata->fullmessage = '';
1948 1947 $eventdata->fullmessagehtml = $message;
  1948 + //some message processors may revert to sending plain text even if html is supplied
  1949 + //so we keep both plain and html versions if we're intending to send html
  1950 + $eventdata->fullmessage = html_to_text($eventdata->fullmessagehtml);
1949 1951 } else {
1950 1952 $eventdata->fullmessage = $message;
1951 1953 $eventdata->fullmessagehtml = '';

0 comments on commit 878ff40

Please sign in to comment.
Something went wrong with that request. Please try again.