deleteChatDirectLink method
- ChatId? groupId,
Deletes the current ChatDirectLink of the given Chat-group.
Authentication
Mandatory.
Result
Only the following ChatEvent may be produced on success:
Idempotent
Succeeds as no-op (and returns no ChatEvent) if the given Chat-group has no active ChatDirectLinks already.
Implementation
Future<ChatEventsVersionedMixin?> deleteChatDirectLink({
ChatId? groupId,
}) async {
Log.debug('deleteChatDirectLink($groupId)', '$runtimeType');
final variables = DeleteChatDirectLinkArguments(groupId: groupId);
final QueryResult result = await client.mutate(
MutationOptions(
operationName: 'DeleteChatDirectLink',
document: DeleteChatDirectLinkMutation(variables: variables).document,
variables: variables.toJson(),
),
onException:
(data) => DeleteChatDirectLinkException(
DeleteChatDirectLink$Mutation.fromJson(data).deleteChatDirectLink
as DeleteChatDirectLinkErrorCode,
),
);
return DeleteChatDirectLink$Mutation.fromJson(
result.data!,
).deleteChatDirectLink
as ChatEventsVersionedMixin?;
}