Toggle explicit mentions in comment boxes with explicit_mentions config
This commit is contained in:
parent
e8ca8182db
commit
9887f2c3d0
1 changed files with 7 additions and 1 deletions
|
@ -6,6 +6,7 @@ namespace Friendica\Object;
|
||||||
|
|
||||||
use Friendica\BaseObject;
|
use Friendica\BaseObject;
|
||||||
use Friendica\Content\ContactSelector;
|
use Friendica\Content\ContactSelector;
|
||||||
|
use Friendica\Content\Feature;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Addon;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
|
@ -772,13 +773,18 @@ class Post extends BaseObject
|
||||||
* Get default text for the comment box
|
* Get default text for the comment box
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private function getDefaultText()
|
private function getDefaultText()
|
||||||
{
|
{
|
||||||
$a = self::getApp();
|
$a = self::getApp();
|
||||||
|
|
||||||
if (!local_user() || empty($a->profile['addr'])) {
|
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()]);
|
$item = Item::selectFirst(['author-addr'], ['id' => $this->getId()]);
|
||||||
|
|
Loading…
Reference in a new issue