]> git.mxchange.org Git - friendica.git/blobdiff - include/api.php
User hide_dislike user setting to hide dislike button and conversation responses
[friendica.git] / include / api.php
index 6f5120691cffe56f9e9ea9de52c763635d40b2cc..567e3cc439a15d393f6eac3ad775821461a15134 100644 (file)
@@ -1,5 +1,22 @@
 <?php
 /**
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @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/>.
+ *
  * Friendica implementation of statusnet/twitter API
  *
  * @file include/api.php
@@ -5906,7 +5923,7 @@ function api_friendica_notification_seen($type)
                $notify = DI::notify()->getByID($id);
                DI::notify()->setSeen(true, $notify);
 
-               if ($notify->otype === Notify::OTYPE_ITEM) {
+               if ($notify->otype === Notify\ObjectType::ITEM) {
                        $item = Item::selectFirstForUser(api_user(), [], ['id' => $notify->iid, 'uid' => api_user()]);
                        if (DBA::isResult($item)) {
                                // we found the item, return it to the user