Move Activity/Namespaces defines to constants

This commit is contained in:
Philipp Holzer 2019-10-24 00:25:43 +02:00
parent 978262a718
commit 07cea24430
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
34 changed files with 467 additions and 403 deletions

View file

@ -240,7 +240,7 @@ class Post extends BaseObject
$isevent = false;
$attend = [];
if ($item['object-type'] === ACTIVITY_OBJ_EVENT) {
if ($item['object-type'] === Activity::OBJ_EVENT) {
$response_verbs[] = 'attendyes';
$response_verbs[] = 'attendno';
$response_verbs[] = 'attendmaybe';
@ -531,8 +531,8 @@ class Post extends BaseObject
*/
if ($item->getDataValue('network') === Protocol::MAIL && local_user() != $item->getDataValue('uid')) {
return false;
} elseif ($activity->match($item->getDataValue('verb'), ACTIVITY_LIKE) ||
$activity->match($item->getDataValue('verb'), ACTIVITY_DISLIKE)) {
} elseif ($activity->match($item->getDataValue('verb'), Activity::LIKE) ||
$activity->match($item->getDataValue('verb'), Activity::DISLIKE)) {
return false;
}