-- ------------------------------------------
-- Friendica 2023.03-dev (Giant Rhubarb)
--- DB_UPDATE_VERSION 1514
+-- DB_UPDATE_VERSION 1515
-- ------------------------------------------
--- /dev/null
+Table config
+===========
+
+main configuration storage
+
+Fields
+------
+
+| Field | Description | Type | Null | Key | Default | Extra |
+| ----- | ------------------------- | ------------- | ---- | --- | ------- | -------------- |
+| id | | int unsigned | NO | PRI | NULL | auto_increment |
+| cat | The category of the entry | varbinary(50) | NO | | | |
+| k | The key of the entry | varbinary(50) | NO | | | |
+| v | | mediumtext | YES | | NULL | |
+
+Indexes
+------------
+
+| Name | Fields |
+| ------- | -------------- |
+| PRIMARY | id |
+| cat_k | UNIQUE, cat, k |
+
+
+Return to [database documentation](help/database)
*/
const READ = ActivityNamespace::ACTIVITY2 . 'read';
- const O_UNFOLLOW = ActivityNamespace::OSTATUS . '/unfollow';
- const O_UNFAVOURITE = ActivityNamespace::OSTATUS . '/unfavorite';
-
/**
- * React to a post via an emoji
+ * Indicates that the actor has viewed the object.
*
+ * @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-view
* @var string
*/
- const EMOJIREACT = ActivityNamespace::LITEPUB . '/emojireact';
+ const VIEW = ActivityNamespace::ACTIVITY2 . 'view';
+
+ const O_UNFOLLOW = ActivityNamespace::OSTATUS . '/unfollow';
+ const O_UNFAVOURITE = ActivityNamespace::OSTATUS . '/unfavorite';
/**
- * View notification from Peertube
+ * React to a post via an emoji
*
* @var string
*/
- const VIEW = ActivityNamespace::PEERTUBE . '/view';
+ const EMOJIREACT = ActivityNamespace::LITEPUB . '/emojireact';
/**
* likes (etc.) can apply to other things besides posts. Check if they are post children,
return true;
}
- if ($type == 'as:View') {
+ if (!DI::config()->get('system', 'process_view') && ($type == 'as:View')) {
Logger::info('View activities are ignored.', ['signer' => $signer, 'http_signer' => $http_signer]);
return true;
}
use Friendica\Database\DBA;
if (!defined('DB_UPDATE_VERSION')) {
- define('DB_UPDATE_VERSION', 1514);
+ define('DB_UPDATE_VERSION', 1515);
}
return [
// Sets the ImageMagick compression level for PNG images. Values range from 0 (uncompressed) to 9 (most compressed).
'png_quality' => 8,
+ // process_view (Boolean)
+ // Process the "View" activity that is used by Peertube. View activities are displayed, when "emoji_activities" are enabled.
+ 'process_view' => false,
+
// profiler (Boolean)
// Enable internal timings to help optimize code. Needed for "rendertime" addon.
'profiler' => false,
use Friendica\Model\Post;
use Friendica\Model\Profile;
use Friendica\Model\User;
+use Friendica\Protocol\Activity;
use Friendica\Protocol\Delivery;
use Friendica\Security\PermissionSet\Repository\PermissionSet;
return Update::SUCCESS;
}
+
+function update_1515()
+{
+ DBA::update('verb', ['name' => Activity::VIEW], ['name' => 'https://joinpeertube.org/view']);
+ return Update::SUCCESS;
+}