掲示板

Automatic Friend association when users are in the same organization

thumbnail
11年前 に Brian Scott Schupbach によって更新されました。

Automatic Friend association when users are in the same organization

Expert 投稿: 329 参加年月日: 08/10/23 最新の投稿
Is there a way to have users be automatically associated as "friends" without the need to send friend requests? It seems the chat functionality works this way but not any of the socialnetworking portlets.

Thanks,

Brian
thumbnail
11年前 に Anil T によって更新されました。

RE: Automatic Friend association when users are in the same organization

Expert 投稿: 313 参加年月日: 12/01/14 最新の投稿
Hi,
You can get it through SocialRelationLocalServiceUtil class. First get all users from organization and use SocialRelationLocalServiceUtil.hasRelation(userId1,userId2,type) to check whether the user in friends or not. If he is not a friend then add him to socialrelation table through SocialRelationLocalServiceUtil.addRelation(userId1,userid2,type);
thumbnail
11年前 に Brian Scott Schupbach によって更新されました。

RE: Automatic Friend association when users are in the same organization

Expert 投稿: 329 参加年月日: 08/10/23 最新の投稿
Thanks..I appreciate that. That's kind of a bummer that each user of an organization would need to loop through every other user.