mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:15:14 +00:00
Merge branch 'dev' of /home/macgirvin/z into dev
This commit is contained in:
commit
7f1e3d4923
3 changed files with 30 additions and 7 deletions
|
@ -798,7 +798,7 @@ class Connedit extends Controller {
|
|||
'$permcat_enable' => feature_enabled(local_channel(),'permcats'),
|
||||
'$addr' => unpunify($contact['xchan_addr']),
|
||||
'$primeurl' => unpunify($contact['xchan_url']),
|
||||
'$block_announce' => [ 'block_announce', t('Ignore shares and repeats this connection posts'), get_abconfig(local_channel(),$contact['xchan_hash'],'system','block_announce',false),'', [ t('No'), t('Yes') ] ],
|
||||
'$block_announce' => [ 'block_announce', t('Ignore shares and repeats this connection posts'), get_abconfig(local_channel(),$contact['xchan_hash'],'system','block_announce',false),t('Note: This is not recommended for Groups.'), [ t('No'), t('Yes') ] ],
|
||||
'$section' => $section,
|
||||
'$sections' => $sections,
|
||||
'$vcard' => $vcard,
|
||||
|
|
5
boot.php
5
boot.php
|
@ -17,9 +17,8 @@ use Zotlabs\Daemon\Run;
|
|||
* @brief This file defines some global constants and includes the central App class.
|
||||
*/
|
||||
|
||||
|
||||
define ( 'STD_VERSION', '21.06.22' );
|
||||
define ( 'NOMAD_REVISION', '10.0' );
|
||||
define ( 'STD_VERSION', '21.06.25' );
|
||||
define ( 'ZOT_REVISION', '10.0' );
|
||||
|
||||
define ( 'DB_UPDATE_VERSION', 1248 );
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ use Zotlabs\Lib\Libzot;
|
|||
use Zotlabs\Lib\Libsync;
|
||||
use Zotlabs\Lib\AccessList;
|
||||
use Zotlabs\Lib\Activity;
|
||||
use Zotlabs\Lib\ActivityStreams;
|
||||
use Zotlabs\Lib\Apps;
|
||||
|
||||
use Zotlabs\Lib as Zlib;
|
||||
|
@ -2701,7 +2702,12 @@ function tag_deliver($uid, $item_id) {
|
|||
);
|
||||
|
||||
if ($x) {
|
||||
if ($is_group) {
|
||||
|
||||
// group comments don't normally require a second delivery chain
|
||||
// but we create a linked Announce so they will show up in the home timeline
|
||||
// on microblog platforms and this creates a second delivery chain
|
||||
|
||||
if ($is_group && intval($x[0]['item_wall'])) {
|
||||
// don't let the forked delivery chain recurse
|
||||
if ($item['verb'] === 'Announce' && $item['author_xchan'] === $u['channel_hash']) {
|
||||
return;
|
||||
|
@ -2710,8 +2716,11 @@ function tag_deliver($uid, $item_id) {
|
|||
if (intval($item['item_blocked']) === ITEM_MODERATED) {
|
||||
return;
|
||||
}
|
||||
// don't boost likes
|
||||
if (in_array($item['verb'], [ 'Like','Dislike' ])) {
|
||||
|
||||
// don't boost likes and other response activities as it is likely that
|
||||
// few platforms will handle this in an elegant way
|
||||
|
||||
if (ActivityStreams::is_response_activity($item['verb'])) {
|
||||
return;
|
||||
}
|
||||
logger('group_comment');
|
||||
|
@ -3078,9 +3087,18 @@ function start_delivery_chain($channel, $item, $item_id, $parent, $group = false
|
|||
}
|
||||
}
|
||||
|
||||
// This creates an embedded share authored by the group actor.
|
||||
// The original message is no longer needed and its presence can cause
|
||||
// confusion so make it hidden.
|
||||
|
||||
if ($group && (! $parent)) {
|
||||
|
||||
$arr = [];
|
||||
|
||||
// hide original message
|
||||
q("update item set item_hidden = 1 where id = %d",
|
||||
intval($item_id)
|
||||
);
|
||||
|
||||
if ($edit) {
|
||||
// process edit or delete action
|
||||
|
@ -3237,6 +3255,12 @@ function start_delivery_chain($channel, $item, $item_id, $parent, $group = false
|
|||
$arr['obj'] = $item['mid'];
|
||||
}
|
||||
|
||||
if (is_array($arr['obj'])) {
|
||||
$obj_actor = ((isset($arr['obj']['actor'])) ? $arr['obj']['actor'] : $arr['obj']['attributedTo']);
|
||||
$mention = Activity::get_actor_bbmention($obj_actor);
|
||||
$arr['body'] = sprintf( t('🔁 Repeated %1$s\'s %2$s'), $mention, $arr['obj']['type']);
|
||||
}
|
||||
|
||||
$arr['author_xchan'] = $channel['channel_hash'];
|
||||
|
||||
$arr['item_wall'] = 1;
|
||||
|
|
Loading…
Reference in a new issue