Commit 4bad10cd authored by JC Brand's avatar JC Brand

muc-views: Fix mess in previous commit

parent 16d2fa3f
...@@ -1963,16 +1963,17 @@ converse.plugins.add('converse-muc-views', { ...@@ -1963,16 +1963,17 @@ converse.plugins.add('converse-muc-views', {
}, },
setChatRoomSubject () { setChatRoomSubject () {
const subject = this.model.get('subject');
if (!subject.text && !subject.author) { if (!subject.text && !subject.author) {
return; // Probably a new MUC return; // Probably a new MUC
} }
// For translators: the %1$s and %2$s parts will get const author = subject.author;
// replaced by the user and topic text respectively // For translators: the %1$s part will get
// Example: Topic set by JC Brand to: Hello World! // replaced by the user's name.
const subject = this.model.get('subject'), // Example: Topic set by JC Brand
message = subject.text ? __('Topic set by %1$s', subject.author) : const message = subject.text ? __('Topic set by %1$s', author) : __('Topic cleared by %1$s', author);
__('Topic cleared by %1$s', subject.author), const date = (new Date()).toISOString();
date = (new Date()).toISOString();
this.content.insertAdjacentHTML( this.content.insertAdjacentHTML(
'beforeend', 'beforeend',
tpl_info({ tpl_info({
......
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