2011-12-08 09:28:27 +00:00
|
|
|
<?php
|
2017-11-20 20:37:30 +00:00
|
|
|
/**
|
2021-03-29 06:40:20 +00:00
|
|
|
* @copyright Copyright (C) 2010-2021, the Friendica project
|
2020-02-09 15:18:46 +00:00
|
|
|
*
|
|
|
|
* @license GNU AGPL version 3 or any later version
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*
|
2017-11-20 20:37:30 +00:00
|
|
|
*/
|
2018-01-25 02:08:45 +00:00
|
|
|
|
2019-12-15 23:47:24 +00:00
|
|
|
use Friendica\DI;
|
2017-04-30 04:07:00 +00:00
|
|
|
|
2016-05-21 11:19:30 +00:00
|
|
|
/**
|
2020-01-19 06:05:23 +00:00
|
|
|
* Creates a notification entry and possibly sends a mail
|
2016-05-21 11:19:30 +00:00
|
|
|
*
|
|
|
|
* @param array $params Array with the elements:
|
2021-08-24 08:53:15 +00:00
|
|
|
* type, event, otype, activity, verb, uid, cid, item, link,
|
2020-11-25 19:56:39 +00:00
|
|
|
* source_name, source_mail, source_nick, source_link, source_photo,
|
|
|
|
* show_in_notification_page
|
2021-05-09 11:54:34 +00:00
|
|
|
*
|
2019-01-21 16:36:01 +00:00
|
|
|
* @return bool
|
2019-01-07 15:24:06 +00:00
|
|
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
2016-05-21 11:19:30 +00:00
|
|
|
*/
|
2018-01-04 02:12:19 +00:00
|
|
|
function notification($params)
|
|
|
|
{
|
2021-10-19 19:09:53 +00:00
|
|
|
return DI::notify()->createFromArray($params);
|
2021-08-21 20:35:04 +00:00
|
|
|
}
|