mirror of
https://github.com/friendica/friendica
synced 2025-04-25 13:50:10 +00:00
Fixed message, relationships endpoint added
This commit is contained in:
parent
6175b065ec
commit
6a5083d918
10 changed files with 73 additions and 14 deletions
|
@ -48,7 +48,7 @@ class Bookmark extends BaseApi
|
|||
}
|
||||
|
||||
if ($item['gravity'] != GRAVITY_PARENT) {
|
||||
DI::mstdnError()->UnprocessableEntity(DI::l10n()->t('Only starting post can be bookmarked'));
|
||||
DI::mstdnError()->UnprocessableEntity(DI::l10n()->t('Only starting posts can be bookmarked'));
|
||||
}
|
||||
|
||||
Item::update(['starred' => true], ['id' => $item['id']]);
|
||||
|
|
|
@ -47,7 +47,7 @@ class Mute extends BaseApi
|
|||
}
|
||||
|
||||
if ($item['gravity'] != GRAVITY_PARENT) {
|
||||
DI::mstdnError()->UnprocessableEntity(DI::l10n()->t('Only starting post can be muted'));
|
||||
DI::mstdnError()->UnprocessableEntity(DI::l10n()->t('Only starting posts can be muted'));
|
||||
}
|
||||
|
||||
Post\ThreadUser::setIgnored($parameters['id'], $uid, true);
|
||||
|
|
|
@ -47,7 +47,7 @@ class Pin extends BaseApi
|
|||
}
|
||||
|
||||
if ($item['gravity'] != GRAVITY_PARENT) {
|
||||
DI::mstdnError()->UnprocessableEntity(DI::l10n()->t('Only starting post can be pinned'));
|
||||
DI::mstdnError()->UnprocessableEntity(DI::l10n()->t('Only starting posts can be pinned'));
|
||||
}
|
||||
|
||||
Post\ThreadUser::setPinned($parameters['id'], $uid, true);
|
||||
|
|
|
@ -48,7 +48,7 @@ class Unbookmark extends BaseApi
|
|||
}
|
||||
|
||||
if ($item['gravity'] != GRAVITY_PARENT) {
|
||||
DI::mstdnError()->UnprocessableEntity(DI::l10n()->t('Only starting post can be unbookmarked'));
|
||||
DI::mstdnError()->UnprocessableEntity(DI::l10n()->t('Only starting posts can be unbookmarked'));
|
||||
}
|
||||
|
||||
Item::update(['starred' => false], ['id' => $item['id']]);
|
||||
|
|
|
@ -47,7 +47,7 @@ class Unmute extends BaseApi
|
|||
}
|
||||
|
||||
if ($item['gravity'] != GRAVITY_PARENT) {
|
||||
DI::mstdnError()->UnprocessableEntity(DI::l10n()->t('Only starting post can be unmuted'));
|
||||
DI::mstdnError()->UnprocessableEntity(DI::l10n()->t('Only starting posts can be unmuted'));
|
||||
}
|
||||
|
||||
Post\ThreadUser::setIgnored($parameters['id'], $uid, false);
|
||||
|
|
|
@ -47,7 +47,7 @@ class Unpin extends BaseApi
|
|||
}
|
||||
|
||||
if ($item['gravity'] != GRAVITY_PARENT) {
|
||||
DI::mstdnError()->UnprocessableEntity(DI::l10n()->t('Only starting post can be pinned'));
|
||||
DI::mstdnError()->UnprocessableEntity(DI::l10n()->t('Only starting posts can be pinned'));
|
||||
}
|
||||
|
||||
Post\ThreadUser::setPinned($parameters['id'], $uid, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue