Commit 08b402a9 authored by JC Brand's avatar JC Brand

MUC: check for author to avoid "cleared" message for empty subject

parent 4ef53630
......@@ -1713,7 +1713,7 @@ converse.plugins.add('converse-muc', {
const subject = attrs.subject;
const author = attrs.nick;
u.safeSave(this, {'subject': {author, 'text': attrs.subject || ''}});
if (!attrs.is_delayed) {
if (!attrs.is_delayed && author) {
const message = subject ? __('Topic set by %1$s', author) : __('Topic cleared by %1$s', author);
const prev_msg = this.messages.last();
if (prev_msg?.get('nick') !== attrs.nick ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment