allow delivery report for not just the author, but also if you're the owner and it's on your wall.
This commit is contained in:
parent
bad5057a74
commit
c44acb3575
@ -21,10 +21,11 @@ class Dreport extends \Zotlabs\Web\Controller {
|
|||||||
$table = 'push';
|
$table = 'push';
|
||||||
$mid = ((argc() > 2) ? argv(2) : '');
|
$mid = ((argc() > 2) ? argv(2) : '');
|
||||||
if($mid) {
|
if($mid) {
|
||||||
$i = q("select id from item where mid = '%s' and author_xchan = '%s' and uid = %d",
|
$i = q("select id from item where mid = '%s' and uid = %d and ( author_xchan = '%s' or ( owner_xchan = '%s' and item_wall = 1 )) ",
|
||||||
dbesc($mid),
|
dbesc($mid),
|
||||||
|
intval($channel['channel_id']),
|
||||||
dbesc($channel['channel_hash']),
|
dbesc($channel['channel_hash']),
|
||||||
intval($channel['channel_id'])
|
dbesc($channel['channel_hash'])
|
||||||
);
|
);
|
||||||
if($i) {
|
if($i) {
|
||||||
\Zotlabs\Daemon\Master::Summon([ 'Notifier', 'edit_post', $i[0]['id'] ]);
|
\Zotlabs\Daemon\Master::Summon([ 'Notifier', 'edit_post', $i[0]['id'] ]);
|
||||||
@ -47,8 +48,9 @@ class Dreport extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
switch($table) {
|
switch($table) {
|
||||||
case 'item':
|
case 'item':
|
||||||
$i = q("select id from item where mid = '%s' and author_xchan = '%s' ",
|
$i = q("select id from item where mid = '%s' and ( author_xchan = '%s' or ( owner_xchan = '%s' and item_wall = 1 )) ",
|
||||||
dbesc($mid),
|
dbesc($mid),
|
||||||
|
dbesc($channel['channel_hash']),
|
||||||
dbesc($channel['channel_hash'])
|
dbesc($channel['channel_hash'])
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user