- methods should ALWAYS start lower-case, not upper
- documented a bit more
This commit is contained in:
Roland Häder 2022-08-12 13:13:05 +02:00
parent 9794ce0c87
commit 33c7abd376
No known key found for this signature in database
GPG Key ID: C82EDE5DDFA0BA77
3 changed files with 6 additions and 3 deletions

View File

@ -46,9 +46,12 @@ class Conversation extends BaseFactory
}
/**
* @param int $id Conversation id
*
* @return \Friendica\Object\Api\Mastodon\Conversation
* @throws ImagickException|HTTPException\InternalServerErrorException|HTTPException\NotFoundException
*/
public function CreateFromConvId(int $id): \Friendica\Object\Api\Mastodon\Conversation
public function createFromConvId(int $id): \Friendica\Object\Api\Mastodon\Conversation
{
$accounts = [];
$unread = false;

View File

@ -85,7 +85,7 @@ class Conversations extends BaseApi
while ($conv = DBA::fetch($convs)) {
self::setBoundaries($conv['id']);
$conversations[] = DI::mstdnConversation()->CreateFromConvId($conv['id']);
$conversations[] = DI::mstdnConversation()->createFromConvId($conv['id']);
}
DBA::close($convs);

View File

@ -42,6 +42,6 @@ class Read extends BaseApi
DBA::update('mail', ['seen' => true], ['convid' => $this->parameters['id'], 'uid' => $uid]);
System::jsonExit(DI::mstdnConversation()->CreateFromConvId($this->parameters['id'])->toArray());
System::jsonExit(DI::mstdnConversation()->createFromConvId($this->parameters['id'])->toArray());
}
}