unblock method

Future<void> unblock()

Unblock the Redditor.

Implementation

Future<void> unblock() async {
  final currentUser = (await reddit.user.me()) as Redditor;
  final data = {
    'container': 't2_' + currentUser.data!['id'],
    'name': displayName,
    'type': 'enemy',
  };
  await _throwOnInvalidRedditor(() async => await reddit.post(
      apiPath['unfriend'].replaceAll(RedditorRef._subredditRegExp, 'all'),
      data,
      discardResponse: true));
}