support for mentioning via @ added
This commit is contained in:
parent
3c037c0359
commit
283e7e78a0
|
@ -374,12 +374,18 @@ public class Utils {
|
||||||
* @return
|
* @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 pageToRedirectURL = "profile";
|
||||||
String httpGETAttrName = "";
|
String httpGETAttrName = "";
|
||||||
String httpGETAttrValue ="";
|
String httpGETAttrValue ="";
|
||||||
|
|
||||||
for (ItemBean tagged : mentionedUsers) {
|
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
|
String taggedHTML = "<a class=\"link\" href=\""+pageToRedirectURL
|
||||||
+"?"+
|
+"?"+
|
||||||
new String(Base64.encodeBase64(httpGETAttrName.getBytes()))+"="+
|
new String(Base64.encodeBase64(httpGETAttrName.getBytes()))+"="+
|
||||||
|
|
Loading…
Reference in New Issue