deleteChatDirectLink method
- ChatId groupId
override
Deletes the current ChatDirectLink of the given Chat-group.
Implementation
@override
Future<void> deleteChatDirectLink(ChatId groupId) async {
Log.debug('deleteChatDirectLink($groupId)', '$runtimeType');
final RxChatImpl? chat = chats[groupId];
final ChatDirectLink? link = chat?.chat.value.directLink;
chat?.chat.update((c) => c?.directLink = null);
try {
await _graphQlProvider.deleteChatDirectLink(groupId: groupId);
} catch (_) {
chat?.chat.update((c) => c?.directLink = link);
rethrow;
}
}