Channels are a new way to see different content

This commit is contained in:
Michael 2023-09-01 21:56:59 +00:00
parent 5c26ba5f5d
commit 5c166be3fc
22 changed files with 860 additions and 249 deletions

View file

@ -21,6 +21,7 @@
namespace Friendica\Object;
use Friendica\Content\Conversation;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\DI;
@ -73,24 +74,28 @@ class Thread
$a = DI::app();
switch ($mode) {
case 'network':
case 'notes':
case Conversation::MODE_NETWORK:
case Conversation::MODE_NOTES:
$this->profile_owner = DI::userSession()->getLocalUserId();
$this->writable = true;
break;
case 'profile':
case Conversation::MODE_PROFILE:
$this->profile_owner = $a->getProfileOwner();
$this->writable = Security::canWriteToUserWall($this->profile_owner) || $writable;
break;
case 'display':
case Conversation::MODE_DISPLAY:
$this->profile_owner = $a->getProfileOwner();
$this->writable = Security::canWriteToUserWall($this->profile_owner) || $writable;
break;
case 'community':
case Conversation::MODE_CHANNEL:
$this->profile_owner = 0;
$this->writable = $writable;
break;
case 'contacts':
case Conversation::MODE_COMMUNITY:
$this->profile_owner = 0;
$this->writable = $writable;
break;
case Conversation::MODE_CONTACTS:
$this->profile_owner = 0;
$this->writable = $writable;
break;