Browse Source

Fix /me message mangling.

On messages like "/me foo /me" it would replace all occurencies of
"/me" with an empty string.
Instead this trims only the "Left" parts of the message. Left as
defined in the `.trim_left_matches()` method of `str`in the rustdocs.
environments/review-jsparber-h-cxnwl8/deployments/1
Jordan Petridis 8 years ago
parent
commit
dafea56be9
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6
  1. 4
      fractal-gtk/src/app.rs

4
fractal-gtk/src/app.rs

@ -1242,8 +1242,8 @@ impl AppOp {
id: None,
};
if msg.starts_with("/me") {
m.body = msg.replace("/me ", "");
if msg.starts_with("/me ") {
m.body = msg.trim_left_matches("/me ").to_owned();
m.mtype = strn!("m.emote");
};

Loading…
Cancel
Save