FIX: Small actions weren't showing the avatar of who did it
This commit is contained in:
parent
bd967ba38c
commit
68db4057dc
|
@ -3,6 +3,7 @@ import RawHtml from 'discourse/widgets/raw-html';
|
||||||
import { iconNode } from 'discourse/helpers/fa-icon';
|
import { iconNode } from 'discourse/helpers/fa-icon';
|
||||||
import { h } from 'virtual-dom';
|
import { h } from 'virtual-dom';
|
||||||
import { actionDescriptionHtml } from 'discourse/components/small-action';
|
import { actionDescriptionHtml } from 'discourse/components/small-action';
|
||||||
|
import { avatarFor } from 'discourse/widgets/post';
|
||||||
|
|
||||||
const icons = {
|
const icons = {
|
||||||
'closed.enabled': 'lock',
|
'closed.enabled': 'lock',
|
||||||
|
@ -44,6 +45,8 @@ export default createWidget('post-small-action', {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
contents.push(avatarFor.call(this, 'small', { template: attrs.avatar_template, username: attrs.avatar }));
|
||||||
|
|
||||||
const description = actionDescriptionHtml(attrs.actionCode, attrs.created_at, attrs.actionCodeWho);
|
const description = actionDescriptionHtml(attrs.actionCode, attrs.created_at, attrs.actionCodeWho);
|
||||||
contents.push(new RawHtml({ html: `<p>${description}</p>` }));
|
contents.push(new RawHtml({ html: `<p>${description}</p>` }));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue