support for mentioning via @ added

This commit is contained in:
Massimiliano Assante 2019-09-19 11:35:41 +02:00
parent 3c037c0359
commit 283e7e78a0
1 changed files with 8 additions and 2 deletions

View File

@ -374,12 +374,18 @@ public class Utils {
* @return
*/
public static String convertMentionUsernamesAnchorHTML(String escapedPostText, ArrayList<ItemBean> mentionedUsers) {
public static String convertMentionUsernamesAnchorHTML(String escapedPostText, ArrayList<ItemBean> mentionedUsers, String gatewayURL, String landingPagePath) {
String pageToRedirectURL = "profile";
String httpGETAttrName = "";
String httpGETAttrValue ="";
for (ItemBean tagged : mentionedUsers) {
StringBuilder sb = new StringBuilder(gatewayURL)
.append(landingPagePath)
.append(GCubePortalConstants.USER_PROFILE_FRIENDLY_URL);
pageToRedirectURL = sb.toString();
httpGETAttrName = GCubeSocialNetworking.USER_PROFILE_OID;
httpGETAttrValue = tagged.getName();
String taggedHTML = "<a class=\"link\" href=\""+pageToRedirectURL
+"?"+
new String(Base64.encodeBase64(httpGETAttrName.getBytes()))+"="+