mirror of
https://github.com/friendica/friendica
synced 2025-04-24 00:30:11 +00:00
Rewrite:
- moved constants GRAVITY_* from boot.php to Friendica\Model\Item - also rewrote some array initialization: From: ```` <?php $arr = []; $arr['foo'] = "FOO"; ```` To: ```` <?php $arr['foo'] = "FOO"; ```` - added a few type-hints
This commit is contained in:
parent
e5ae5c7e67
commit
da66730e4f
77 changed files with 547 additions and 513 deletions
|
@ -22,6 +22,7 @@
|
|||
namespace Friendica\Core;
|
||||
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Protocol\Activity;
|
||||
|
@ -139,7 +140,7 @@ class Protocol
|
|||
// create a follow slap
|
||||
$item = [
|
||||
'verb' => Activity::FOLLOW,
|
||||
'gravity' => GRAVITY_ACTIVITY,
|
||||
'gravity' => Item::GRAVITY_ACTIVITY,
|
||||
'follow' => $contact['url'],
|
||||
'body' => '',
|
||||
'title' => '',
|
||||
|
@ -191,14 +192,16 @@ class Protocol
|
|||
|
||||
if (in_array($protocol, [Protocol::OSTATUS, Protocol::DFRN])) {
|
||||
// create an unfollow slap
|
||||
$item = [];
|
||||
$item['verb'] = Activity::O_UNFOLLOW;
|
||||
$item['gravity'] = GRAVITY_ACTIVITY;
|
||||
$item['follow'] = $contact['url'];
|
||||
$item['body'] = '';
|
||||
$item['title'] = '';
|
||||
$item['guid'] = '';
|
||||
$item['uri-id'] = 0;
|
||||
$item = [
|
||||
'verb' => Activity::O_UNFOLLOW,
|
||||
'gravity' => Item::GRAVITY_ACTIVITY,
|
||||
'follow' => $contact['url'],
|
||||
'body' => '',
|
||||
'title' => '',
|
||||
'guid' => '',
|
||||
'uri-id' => 0,
|
||||
];
|
||||
|
||||
$slap = OStatus::salmon($item, $user);
|
||||
|
||||
if (empty($contact['notify'])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue