kopia lustrzana https://github.com/friendica/friendica
Merge pull request #6945 from annando/announce
Preparation to be able to store "announce" activitiespull/6949/head
commit
2f20ba4aa7
2
boot.php
2
boot.php
|
@ -204,6 +204,7 @@ define('NAMESPACE_ZOT', 'http://purl.org/zot');
|
||||||
define('NAMESPACE_DFRN', 'http://purl.org/macgirvin/dfrn/1.0');
|
define('NAMESPACE_DFRN', 'http://purl.org/macgirvin/dfrn/1.0');
|
||||||
define('NAMESPACE_THREAD', 'http://purl.org/syndication/thread/1.0');
|
define('NAMESPACE_THREAD', 'http://purl.org/syndication/thread/1.0');
|
||||||
define('NAMESPACE_TOMB', 'http://purl.org/atompub/tombstones/1.0');
|
define('NAMESPACE_TOMB', 'http://purl.org/atompub/tombstones/1.0');
|
||||||
|
define('NAMESPACE_ACTIVITY2', 'https://www.w3.org/ns/activitystreams#');
|
||||||
define('NAMESPACE_ACTIVITY', 'http://activitystrea.ms/spec/1.0/');
|
define('NAMESPACE_ACTIVITY', 'http://activitystrea.ms/spec/1.0/');
|
||||||
define('NAMESPACE_ACTIVITY_SCHEMA', 'http://activitystrea.ms/schema/1.0/');
|
define('NAMESPACE_ACTIVITY_SCHEMA', 'http://activitystrea.ms/schema/1.0/');
|
||||||
define('NAMESPACE_MEDIA', 'http://purl.org/syndication/atommedia');
|
define('NAMESPACE_MEDIA', 'http://purl.org/syndication/atommedia');
|
||||||
|
@ -246,6 +247,7 @@ define('ACTIVITY_FAVORITE', NAMESPACE_ACTIVITY_SCHEMA . 'favorite');
|
||||||
define('ACTIVITY_UNFAVORITE', NAMESPACE_ACTIVITY_SCHEMA . 'unfavorite');
|
define('ACTIVITY_UNFAVORITE', NAMESPACE_ACTIVITY_SCHEMA . 'unfavorite');
|
||||||
define('ACTIVITY_SHARE', NAMESPACE_ACTIVITY_SCHEMA . 'share');
|
define('ACTIVITY_SHARE', NAMESPACE_ACTIVITY_SCHEMA . 'share');
|
||||||
define('ACTIVITY_DELETE', NAMESPACE_ACTIVITY_SCHEMA . 'delete');
|
define('ACTIVITY_DELETE', NAMESPACE_ACTIVITY_SCHEMA . 'delete');
|
||||||
|
define('ACTIVITY2_ANNOUNCE', NAMESPACE_ACTIVITY2 . 'Announce');
|
||||||
|
|
||||||
define('ACTIVITY_POKE', NAMESPACE_ZOT . '/activity/poke');
|
define('ACTIVITY_POKE', NAMESPACE_ZOT . '/activity/poke');
|
||||||
|
|
||||||
|
|
|
@ -396,7 +396,7 @@ function visible_activity($item) {
|
||||||
* likes (etc.) can apply to other things besides posts. Check if they are post children,
|
* likes (etc.) can apply to other things besides posts. Check if they are post children,
|
||||||
* in which case we handle them specially
|
* in which case we handle them specially
|
||||||
*/
|
*/
|
||||||
$hidden_activities = [ACTIVITY_LIKE, ACTIVITY_DISLIKE, ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE, ACTIVITY_FOLLOW];
|
$hidden_activities = [ACTIVITY_LIKE, ACTIVITY_DISLIKE, ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE, ACTIVITY_FOLLOW, ACTIVITY2_ANNOUNCE];
|
||||||
foreach ($hidden_activities as $act) {
|
foreach ($hidden_activities as $act) {
|
||||||
if (activity_match($item['verb'], $act)) {
|
if (activity_match($item['verb'], $act)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -92,7 +92,7 @@ class Item extends BaseObject
|
||||||
|
|
||||||
// Never reorder or remove entries from this list. Just add new ones at the end, if needed.
|
// Never reorder or remove entries from this list. Just add new ones at the end, if needed.
|
||||||
// The item-activity table only stores the index and needs this array to know the matching activity.
|
// The item-activity table only stores the index and needs this array to know the matching activity.
|
||||||
const ACTIVITIES = [ACTIVITY_LIKE, ACTIVITY_DISLIKE, ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE, ACTIVITY_FOLLOW];
|
const ACTIVITIES = [ACTIVITY_LIKE, ACTIVITY_DISLIKE, ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE, ACTIVITY_FOLLOW, ACTIVITY2_ANNOUNCE];
|
||||||
|
|
||||||
private static $legacy_mode = null;
|
private static $legacy_mode = null;
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue