Merge pull request #34894 from nextcloud/enhancement/talk-api-delete-conversation

Add Talk converstation delete API
pull/34852/head
Christoph Wurst 2 years ago committed by GitHub
commit aa81b87f26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;
}

Loading…
Cancel
Save