Some more well-known sources from plugins
This commit is contained in:
parent
fe2c0a9687
commit
ec04acb9b4
@ -601,11 +601,13 @@ class ActivityObject
|
|||||||
static function fromNoticeSource(Notice_source $source)
|
static function fromNoticeSource(Notice_source $source)
|
||||||
{
|
{
|
||||||
$object = new ActivityObject();
|
$object = new ActivityObject();
|
||||||
|
$wellKnown = array('web', 'xmpp', 'mail', 'omb', 'system', 'api', 'ostatus',
|
||||||
|
'activity', 'feed', 'mirror', 'twitter', 'facebook');
|
||||||
|
|
||||||
if (Event::handle('StartActivityObjectFromNoticeSource', array($source, &$object))) {
|
if (Event::handle('StartActivityObjectFromNoticeSource', array($source, &$object))) {
|
||||||
$object->type = ActivityObject::APPLICATION;
|
$object->type = ActivityObject::APPLICATION;
|
||||||
|
|
||||||
if (in_array($source->code, array('web', 'xmpp', 'mail', 'omb', 'system', 'api'))) {
|
if (in_array($source->code, $wellKnown)) {
|
||||||
// We use one ID for all well-known StatusNet sources
|
// We use one ID for all well-known StatusNet sources
|
||||||
$object->id = "tag:status.net,2009:notice-source:".$source->code;
|
$object->id = "tag:status.net,2009:notice-source:".$source->code;
|
||||||
} else if ($source->url) {
|
} else if ($source->url) {
|
||||||
|
Loading…
Reference in New Issue
Block a user