Skip to content

Commit

Permalink
#4558 - Build-in API support (befriend)
Browse files Browse the repository at this point in the history
  • Loading branch information
romanlesnikov committed Nov 28, 2023
1 parent b4a41b5 commit bab1b06
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions template/scripts/BxBaseServiceProfiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,15 @@ public function serviceProfileFollowings ($iProfileId = 0)
else
return '';
}

public function serviceBefriend ($iProfileId)
{
$oConnections = BxDolConnection::getObjectInstance('sys_profiles_friends');
$this->_oConnectionFriends->addConnection((int)bx_get_logged_profile_id(), $iProfileId);
$this->_oConnectionFriends->addConnection($iProfileId, (int)bx_get_logged_profile_id());
$oProfile = BxDolProfile::getInstance($iProfileId);
return $oProfile->getUnitAPI($iProfileId);
}

public function serviceProfileStats ($iProfileId = 0)
{
Expand Down
1 change: 1 addition & 0 deletions template/scripts/BxBaseServices.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public function serviceGetSafeServices()
'BrowseSubscriptions' => 'BxBaseServiceProfiles',
'BrowseMembers' => 'BxBaseServiceProfiles',
'UpdateSettings' => 'BxBaseServiceProfiles',
'Befriend' => 'BxBaseServiceProfiles',

'GetChartGrowth' => 'BxBaseChartServices',
'GetChartStats' => 'BxBaseChartServices',
Expand Down

0 comments on commit bab1b06

Please sign in to comment.