mirror of https://github.com/zulip/zulip.git
Fix editing messages by adding or removing leading /me.
Previously, this did not correctly rerender the message to be (or not to be) rendered as a /me style message. Fixes: #835.
This commit is contained in:
parent
dfd8fede4a
commit
e6861636c8
|
@ -47,6 +47,7 @@ exports.save = function (row, from_topic_edited_only) {
|
|||
|
||||
if (new_content !== message.raw_content && !from_topic_edited_only) {
|
||||
request.content = new_content;
|
||||
message.is_me_message = new_content.lastIndexOf('/me', 0) === 0;
|
||||
changed = true;
|
||||
}
|
||||
if (!changed) {
|
||||
|
|
|
@ -2334,6 +2334,9 @@ def update_user_message_flags(message, ums):
|
|||
|
||||
update_flag(um, wildcard, UserMessage.flags.wildcard_mentioned)
|
||||
|
||||
is_me_message = getattr(message, 'is_me_message', False)
|
||||
update_flag(um, is_me_message, UserMessage.flags.is_me_message)
|
||||
|
||||
for um in changed_ums:
|
||||
um.save(update_fields=['flags'])
|
||||
|
||||
|
|
Loading…
Reference in New Issue