mirror of
https://github.com/friendica/friendica
synced 2025-04-19 05:50:10 +00:00
API: We can now post to groups via the Mastodon endpoint
This commit is contained in:
parent
7df5b41f2e
commit
15de709b89
2 changed files with 14 additions and 6 deletions
|
@ -114,10 +114,17 @@ class Statuses extends BaseApi
|
|||
DI::mstdnError()->InternalError('Direct messages are currently unsupported');
|
||||
break;
|
||||
default:
|
||||
$item['allow_cid'] = $owner['allow_cid'];
|
||||
$item['allow_gid'] = $owner['allow_gid'];
|
||||
$item['deny_cid'] = $owner['deny_cid'];
|
||||
$item['deny_gid'] = $owner['deny_gid'];
|
||||
if (is_numeric($request['visibility']) && Group::exists($request['visibility'], $uid)) {
|
||||
$item['allow_cid'] = '';
|
||||
$item['allow_gid'] = '<' . $request['visibility'] . '>';
|
||||
$item['deny_cid'] = '';
|
||||
$item['deny_gid'] = '';
|
||||
} else {
|
||||
$item['allow_cid'] = $owner['allow_cid'];
|
||||
$item['allow_gid'] = $owner['allow_gid'];
|
||||
$item['deny_cid'] = $owner['deny_cid'];
|
||||
$item['deny_gid'] = $owner['deny_gid'];
|
||||
}
|
||||
|
||||
if (!empty($item['allow_cid'] . $item['allow_gid'] . $item['deny_cid'] . $item['deny_gid'])) {
|
||||
$item['private'] = Item::PRIVATE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue