mirror of
https://github.com/friendica/friendica
synced 2025-04-27 23:10:12 +00:00
Merge pull request #6614 from MrPetovan/task/6552-add-explicit-mentions
Add explicit mentions to ActivityPub/Diaspora comments
This commit is contained in:
commit
c7308d98fa
10 changed files with 204 additions and 51 deletions
|
@ -6,6 +6,7 @@ namespace Friendica\Object;
|
|||
|
||||
use Friendica\BaseObject;
|
||||
use Friendica\Content\ContactSelector;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Hook;
|
||||
|
@ -773,13 +774,18 @@ class Post extends BaseObject
|
|||
* Get default text for the comment box
|
||||
*
|
||||
* @return string
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
private function getDefaultText()
|
||||
{
|
||||
$a = self::getApp();
|
||||
|
||||
if (!local_user() || empty($a->profile['addr'])) {
|
||||
return;
|
||||
return '';
|
||||
}
|
||||
|
||||
if (!Feature::isEnabled(local_user(), 'explicit_mentions')) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$item = Item::selectFirst(['author-addr'], ['id' => $this->getId()]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue