patch temporarely incident #13096

git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/share-updates@176310 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2019-01-04 16:41:49 +00:00
parent a97a4dcf25
commit f4539947ac
3 changed files with 17 additions and 13 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/share-updates-2.6.1-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/share-updates-2.6.2-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/share-updates-2.6.1-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<classpathentry excluding="**" kind="src" output="target/share-updates-2.6.2-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
@ -38,5 +38,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/share-updates-2.6.1-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/share-updates-2.6.2-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -13,7 +13,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>share-updates</artifactId>
<packaging>war</packaging>
<version>2.6.1-SNAPSHOT</version>
<version>2.6.2-SNAPSHOT</version>
<name>gCube Share Updates Portlet</name>
<description>
gCube Share Updates for exchanging updates with other users of VREs.

View File

@ -855,15 +855,19 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar
RoleManager rm = new LiferayRoleManager();
try {
for (MentionedDTO mentioned : mentions) {
if (mentioned.getType().equalsIgnoreCase("user")) {
long userId = Long.parseLong(mentioned.id);
GCubeUser user = um.getUserById(userId);
toReturn.add(new ItemBean(user.getUserId()+"", user.getUsername(), user.getFullname(), user.getUserAvatarURL()));
}
else { //is a team
long teamId = Long.parseLong(mentioned.id);
GCubeTeam gCubeTeam = rm.getTeam(teamId);
toReturn.add(new ItemBean(gCubeTeam.getTeamId()+"", gCubeTeam.getTeamName()));
if (mentioned.id != null && mentioned.id.compareTo("") != 0) { //patch temporarely incident #13096
if (mentioned.getType().equalsIgnoreCase("user")) {
long userId = Long.parseLong(mentioned.id);
GCubeUser user = um.getUserById(userId);
toReturn.add(new ItemBean(user.getUserId()+"", user.getUsername(), user.getFullname(), user.getUserAvatarURL()));
}
else { //is a team
long teamId = Long.parseLong(mentioned.id);
GCubeTeam gCubeTeam = rm.getTeam(teamId);
toReturn.add(new ItemBean(gCubeTeam.getTeamId()+"", gCubeTeam.getTeamName()));
}
} else {
_log.warn("getMentionsBean found empty mentioned.id for " + mentioned.toString());
}
}
} catch (Exception e) {