When posting to matrix, encode in triple backticks to create a mono-spaced message
This commit is contained in:
parent
2c4bf83250
commit
86e7e10443
@ -64,6 +64,7 @@ class Echomail extends Matrix
|
|||||||
->post(sprintf('https://%s/_matrix/client/v3/rooms/%s/send/m.room.message',config('matrix.server'),$room),[
|
->post(sprintf('https://%s/_matrix/client/v3/rooms/%s/send/m.room.message',config('matrix.server'),$room),[
|
||||||
'msgtype'=>'m.text',
|
'msgtype'=>'m.text',
|
||||||
'body'=>mb_convert_encoding(str_replace("\r","\n",$this->o->msg),'UTF-8','IBM850'),
|
'body'=>mb_convert_encoding(str_replace("\r","\n",$this->o->msg),'UTF-8','IBM850'),
|
||||||
|
'formatted_body'=>sprintf("```\n%s\n```",mb_convert_encoding(str_replace("\r","\n",$this->o->msg),'UTF-8','IBM850')),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
switch ($msg->status()) {
|
switch ($msg->status()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user