We now send a summary via AP. This partially fixes the problem with Mastodon and Articles
This commit is contained in:
		
					parent
					
						
							
								69f2556f67
							
						
					
				
			
			
				commit
				
					
						dfcf1b1e6f
					
				
			
		
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -20,6 +20,7 @@ use Friendica\Model\Term;
 | 
			
		|||
use Friendica\Model\User;
 | 
			
		||||
use Friendica\Util\DateTimeFormat;
 | 
			
		||||
use Friendica\Content\Text\BBCode;
 | 
			
		||||
use Friendica\Content\Text\Plaintext;
 | 
			
		||||
use Friendica\Util\JsonLD;
 | 
			
		||||
use Friendica\Util\LDSignature;
 | 
			
		||||
use Friendica\Model\Profile;
 | 
			
		||||
| 
						 | 
				
			
			@ -1020,7 +1021,7 @@ class Transmitter
 | 
			
		|||
			return $data;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		$data['summary'] = null; // Ignore by now
 | 
			
		||||
		$data['summary'] = BBCode::getAbstract($item['body'], Protocol::ACTIVITYPUB);
 | 
			
		||||
 | 
			
		||||
		if ($item['uri'] != $item['thr-parent']) {
 | 
			
		||||
			$data['inReplyTo'] = $item['thr-parent'];
 | 
			
		||||
| 
						 | 
				
			
			@ -1054,6 +1055,8 @@ class Transmitter
 | 
			
		|||
 | 
			
		||||
		if ($type == 'Note') {
 | 
			
		||||
			$body = self::removePictures($body);
 | 
			
		||||
		} elseif (($type == 'Article') && empty($data['summary'])) {
 | 
			
		||||
			$data['summary'] = Plaintext::shorten(self::removePictures($body), 1000);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if ($type == 'Event') {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue