Commit 7a3290a2 authored by Matthew Taylor's avatar Matthew Taylor

show recipient for owner notification

parent 7945a7ef
...@@ -36,12 +36,18 @@ var Activity = React.createClass({ ...@@ -36,12 +36,18 @@ 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 actorProfileUrl = '/users/' + item.actor.username + '/'; var username = '';
var actionDate = new Date(item.datetime_created + 'Z'); if (item.type === 22) {
username = item.recipient_username;
} else {
username = item.actor.username;
}
var actorProfileUrl = '/users/' + username + '/';
var activityMessageHTML = ( var activityMessageHTML = (
'<a href=' + actorProfileUrl + '>' + item.actor.username + '</a>' + '<a href=' + actorProfileUrl + '>' + username + '</a>' +
item.message item.message
); );
var actionDate = new Date(item.datetime_created + 'Z');
return ( return (
<li key={item.pk}> <li key={item.pk}>
<a href={actorProfileUrl}> <a href={actorProfileUrl}>
......
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