FIX: Small actions weren't showing the avatar of who did it

This commit is contained in:
Robin Ward 2016-02-09 14:04:56 -05:00
parent bd967ba38c
commit 68db4057dc
1 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,7 @@ import RawHtml from 'discourse/widgets/raw-html';
import { iconNode } from 'discourse/helpers/fa-icon';
import { h } from 'virtual-dom';
import { actionDescriptionHtml } from 'discourse/components/small-action';
import { avatarFor } from 'discourse/widgets/post';
const icons = {
'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);
contents.push(new RawHtml({ html: `<p>${description}</p>` }));