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 store a plain text ver…

…sion as a fallback
  • Loading branch information...
commit 22e23da6f466c1c9fb454fa288b993795a41fb60 1 parent 735de1c
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
@@ -2013,8 +2013,10 @@ function message_post_message($userfrom, $userto, $message, $format) {
2013 2013 $eventdata->subject = get_string_manager()->get_string('unreadnewmessage', 'message', fullname($userfrom), $userto->lang);
2014 2014
2015 2015 if ($format == FORMAT_HTML) {
2016   - $eventdata->fullmessage = '';
2017 2016 $eventdata->fullmessagehtml = $message;
  2017 + //some message processors may revert to sending plain text even if html is supplied
  2018 + //so we keep both plain and html versions if we're intending to send html
  2019 + $eventdata->fullmessage = html_to_text($eventdata->fullmessagehtml);
2018 2020 } else {
2019 2021 $eventdata->fullmessage = $message;
2020 2022 $eventdata->fullmessagehtml = '';

0 comments on commit 22e23da

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