mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-18 09:00:30 -05:00
Merge pull request #1541 from mewtaylor/issue/manager-thumbnail-activity
[Master] Hotfix: use recipient thumbnail, not actor for manager activity
This commit is contained in:
commit
57749008c6
1 changed files with 4 additions and 4 deletions
|
@ -36,11 +36,11 @@ var Activity = React.createClass({
|
||||||
<ul key="activity-ul">
|
<ul key="activity-ul">
|
||||||
{this.props.items.map(function (item) {
|
{this.props.items.map(function (item) {
|
||||||
if (item.message.replace(/\s/g, '')) {
|
if (item.message.replace(/\s/g, '')) {
|
||||||
var username = '';
|
var username = item.actor.username;
|
||||||
|
var thumbnailUrl = item.actor.thumbnail_url;
|
||||||
if (item.type === 22) {
|
if (item.type === 22) {
|
||||||
username = item.recipient_username;
|
username = item.recipient_username;
|
||||||
} else {
|
thumbnailUrl = item.recipient.thumbnail_url;
|
||||||
username = item.actor.username;
|
|
||||||
}
|
}
|
||||||
var actorProfileUrl = '/users/' + username + '/';
|
var actorProfileUrl = '/users/' + username + '/';
|
||||||
var activityMessageHTML = (
|
var activityMessageHTML = (
|
||||||
|
@ -51,7 +51,7 @@ var Activity = React.createClass({
|
||||||
return (
|
return (
|
||||||
<li key={item.pk}>
|
<li key={item.pk}>
|
||||||
<a href={actorProfileUrl}>
|
<a href={actorProfileUrl}>
|
||||||
<img src={item.actor.thumbnail_url} width="34" height="34" alt="" />
|
<img src={thumbnailUrl} width="34" height="34" alt="" />
|
||||||
<p dangerouslySetInnerHTML={{__html: activityMessageHTML}}></p>
|
<p dangerouslySetInnerHTML={{__html: activityMessageHTML}}></p>
|
||||||
<p>
|
<p>
|
||||||
<span className="stamp">
|
<span className="stamp">
|
||||||
|
|
Loading…
Reference in a new issue