Update sending functions to correctly use phone limits and priority

This commit is contained in:
osaajani 2023-02-06 03:42:03 +01:00
parent 9b7907ad18
commit 715afd79ec
4 changed files with 51 additions and 16 deletions

View file

@ -179,6 +179,20 @@ namespace controllers\internals;
return $this->get_model()->get_by_uid_and_adapter_for_user($id_user, $uid, $adapter);
}
/**
* Get number of sended SMS since a date for a phone
*
* @param int $id_user : User id
* @param int $id_phone : Phone id we want the number of sended message for
* @param \DateTime $since : Date since which we want sended number
*
* @return int
*/
public function count_since_for_phone_and_user(int $id_user, int $id_phone, \DateTime $since): int
{
return $this->get_model()->count_since_for_phone_and_user($id_user, $id_phone, $since);
}
/**
* Get number of sended SMS for every date since a date for a specific user.
*