mirror of
https://github.com/friendica/friendica
synced 2025-04-26 23:50:11 +00:00
fix intro.cid and intro.suggest-id
This commit is contained in:
parent
b4572a5293
commit
44627a0b12
5 changed files with 32 additions and 24 deletions
|
@ -147,12 +147,20 @@ class Introduction extends BaseDepository
|
|||
}
|
||||
}
|
||||
|
||||
public function existsForContact(int $cid, int $uid): bool
|
||||
/**
|
||||
* Checks, if the suggested contact already exists for the user
|
||||
*
|
||||
* @param int $sid
|
||||
* @param int $uid
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function suggestionExistsForUser(int $sid, int $uid): bool
|
||||
{
|
||||
try {
|
||||
return $this->exists(['uid' => $uid, 'suggest-cid' => $cid]);
|
||||
return $this->exists(['uid' => $uid, 'suggest-cid' => $sid]);
|
||||
} catch (\Exception $e) {
|
||||
throw new IntroductionPersistenceException(sprintf('Cannot check Introductions for contact %d and user %d', $cid, $uid), $e);
|
||||
throw new IntroductionPersistenceException(sprintf('Cannot check suggested Introduction for contact %d and user %d', $sid, $uid), $e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue