use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Notify\Type;
+use Friendica\Network\HTTPException;
use Friendica\Network\Probe;
use Friendica\Protocol\Activity;
use Friendica\Protocol\ActivityPub;
* @param int $uid User ID
*
* @return boolean is the contact id a follower?
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function isFollower($cid, $uid)
* @param int $uid User ID
*
* @return boolean is the contact id a follower?
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function isFollowerByURL($url, $uid)
* @param int $uid User ID
*
* @return boolean is the contact url being followed?
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function isSharing($cid, $uid)
* @param int $uid User ID
*
* @return boolean is the contact url being followed?
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function isSharingByURL($url, $uid)
* @param boolean $dont_update Don't update the contact
*
* @return string basepath
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function getBasepath($url, $dont_update = false)
* @param int $uid User ID
*
* @return array with public and user's contact id
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function getPublicAndUserContacID($cid, $uid)
* @param int $uid User ID
*
* @return boolean is the contact id blocked for the given user?
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function isCollapsedByUser($cid, $uid)
*
* @param int $uid
* @return bool Operation success
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
*/
public static function createSelfFromUserId($uid)
{
*
* @param int $uid
* @param boolean $update_avatar Force the avatar update
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
*/
public static function updateSelfFromUserID($uid, $update_avatar = false)
{
*
* @param int $id contact id
* @return null
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
*/
public static function remove($id)
{
* @param array $contact Contact unfriended
* @param boolean $dissolve Remove the contact on the remote side
* @return void
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function terminateFriendship(array $user, array $contact, $dissolve = false)
*
* @param array $contact contact to mark for archival
* @return null
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
*/
public static function markForArchival(array $contact)
{
* @param array $default If not data was found take this data as default value
*
* @return array Contact data
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
*/
public static function getDetailsByURL($url, $uid = -1, array $default = [])
{
* @param int $uid User id
*
* @return array Contact data
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function getDetailsByAddr($addr, $uid = -1)
* @param array $contact contact
* @param int $uid optional, default 0
* @return array
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function photoMenu(array $contact, $uid = 0)
* @param boolean $in_loop Internally used variable to prevent an endless loop
*
* @return integer Contact ID
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function getIdForURL($url, $uid = 0, $no_update = false, $default = [], $in_loop = false)
* @param int $cid contact id
*
* @return boolean Is the contact archived?
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
*/
public static function isArchived(int $cid)
{
* @param int $cid contact id
*
* @return boolean Is the contact blocked?
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
*/
public static function isBlocked($cid)
{
* @param bool $force force picture update
*
* @return array Returns array of the different avatar sizes
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function updateAvatar($avatar, $uid, $cid, $force = false)
* @param string $network Optional network we are probing for
* @param boolean $force Optional forcing of network probing (otherwise we use the cached data)
* @return boolean
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function updateFromProbe($id, $network = '', $force = false)
* @param bool $interactive
* @param string $network
* @return array
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function createFromProbe($uid, $url, $interactive = false, $network = '')
* @param bool $sharing True: Contact is now sharing with Owner; False: Contact is now following Owner (default)
* @param string $note Introduction additional message
* @return bool|null True: follow request is accepted; False: relationship is rejected; Null: relationship is pending
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function addRelationship(array $importer, array $contact, array $datarray, $sharing = false, $note = '')
* @param string $url An url that we will be redirected to after the authentication
*
* @return string with "redir" link
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function magicLink($contact_url, $url = '')
* @param string $url An url that we will be redirected to after the authentication
*
* @return string with "redir" link
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function magicLinkbyId($cid, $url = '')
* @param string $url An url that we will be redirected to after the authentication
*
* @return string with "redir" link
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function magicLinkByContact($contact, $url = '')