From 8d921c422e6ac184e025bc968b783bdc0d46ef85 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Thu, 12 Oct 2023 15:37:01 +0200 Subject: [PATCH] fix: Move contacts menu JSON format to public interface Signed-off-by: Christoph Wurst --- lib/private/Contacts/ContactsMenu/Entry.php | 3 --- lib/public/Contacts/ContactsMenu/IEntry.php | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/private/Contacts/ContactsMenu/Entry.php b/lib/private/Contacts/ContactsMenu/Entry.php index f1cb4f9c52fa9..649c83ae7d821 100644 --- a/lib/private/Contacts/ContactsMenu/Entry.php +++ b/lib/private/Contacts/ContactsMenu/Entry.php @@ -141,9 +141,6 @@ public function getProperty(string $key): mixed { return $this->properties[$key]; } - /** - * @return array{id: int|string|null, fullName: string, avatar: string|null, topAction: mixed, actions: array, lastMessage: '', emailAddresses: string[], profileTitle: string|null, profileUrl: string|null} - */ public function jsonSerialize(): array { $topAction = !empty($this->actions) ? $this->actions[0]->jsonSerialize() : null; $otherActions = array_map(function (IAction $action) { diff --git a/lib/public/Contacts/ContactsMenu/IEntry.php b/lib/public/Contacts/ContactsMenu/IEntry.php index 9d78b0c8f5731..244047cea7106 100644 --- a/lib/public/Contacts/ContactsMenu/IEntry.php +++ b/lib/public/Contacts/ContactsMenu/IEntry.php @@ -61,4 +61,9 @@ public function addAction(IAction $action): void; * @return mixed the value of the property or null */ public function getProperty(string $key); + + /** + * @return array{id: int|string|null, fullName: string, avatar: string|null, topAction: mixed, actions: array, lastMessage: '', emailAddresses: string[], profileTitle: string|null, profileUrl: string|null} + */ + public function jsonSerialize(): array; }