activity.getDestinationStream().setDisplayName(person.getDisplayName());
}
else if (activity.getDestinationStream().getType() == EntityType.GROUP)
{
DomainGroupModelView group = groupMapper.fetchUniqueResult(activity.getDestinationStream()
.getUniqueIdentifier());
activity.getDestinationStream().setDisplayName(group.getName());
}
}
final StreamEntityDTO actor = activity.getActor();
if (actor.getType() == EntityType.PERSON)
{
List<PersonModelView> people = getPersonModelViewsByAccountIdsMapper.execute(Collections
.singletonList(actor.getUniqueIdentifier()));
if (!people.isEmpty())
{
final PersonModelView person = people.get(0);
actor.setId(person.getEntityId());
actor.setDestinationEntityId(person.getEntityId());
actor.setDisplayName(person.getDisplayName());
actor.setAvatarId(person.getAvatarId());
}
}
else if (actor.getType() == EntityType.GROUP)
{
List<DomainGroupModelView> groups = groupMapper.execute(Collections.singletonList(actor
.getUniqueIdentifier()));
if (!groups.isEmpty())
{
final DomainGroupModelView group = groups.get(0);
actor.setId(group.getEntityId());
actor.setDestinationEntityId(group.getEntityId());
actor.setDisplayName(group.getName());
actor.setAvatarId(group.getAvatarId());
}
}
// fills in data from cached view of original actor
final StreamEntityDTO originalActor = activity.getOriginalActor();
if (originalActor != null)