зеркало из https://github.com/nextcloud/server.git
Merge pull request #34894 from nextcloud/enhancement/talk-api-delete-conversation
Add Talk converstation delete API
This commit is contained in:
Коммит
aa81b87f26
|
@ -106,4 +106,12 @@ class Broker implements IBroker {
|
|||
$options ?? ConversationOptions::default()
|
||||
);
|
||||
}
|
||||
|
||||
public function deleteConversation(string $id): void {
|
||||
if (!$this->hasBackend()) {
|
||||
throw new NoBackendException("The Talk broker has no registered backend");
|
||||
}
|
||||
|
||||
$this->backend->deleteConversation($id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,4 +71,15 @@ interface IBroker {
|
|||
public function createConversation(string $name,
|
||||
array $moderators,
|
||||
IConversationOptions $options = null): IConversation;
|
||||
|
||||
/**
|
||||
* Delete a conversation by id
|
||||
*
|
||||
* @param string $id conversation id
|
||||
*
|
||||
* @return void
|
||||
* @throws NoBackendException when Talk is not available
|
||||
* @since 26.0.0
|
||||
*/
|
||||
public function deleteConversation(string $id): void;
|
||||
}
|
||||
|
|
|
@ -30,6 +30,14 @@ namespace OCP\Talk;
|
|||
*/
|
||||
interface IConversation {
|
||||
|
||||
/**
|
||||
* Get the unique token that identifies this conversation
|
||||
*
|
||||
* @return string
|
||||
* @since 26.0.0
|
||||
*/
|
||||
public function getId(): string;
|
||||
|
||||
/**
|
||||
* Get the absolute URL to this conversation
|
||||
*
|
||||
|
|
|
@ -49,4 +49,14 @@ interface ITalkBackend {
|
|||
public function createConversation(string $name,
|
||||
array $moderators,
|
||||
IConversationOptions $options): IConversation;
|
||||
|
||||
/**
|
||||
* Delete a conversation by id
|
||||
*
|
||||
* @param string $id conversation id
|
||||
*
|
||||
* @return void
|
||||
* @since 26.0.0
|
||||
*/
|
||||
public function deleteConversation(string $id): void;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче