unblock method

Future<bool> unblock(
  1. List<String> items
)

Implementation

Future<bool> unblock(List<String> items) async {
  assert(items.isNotEmpty, 'The list of items to unblock must be non-empty');

  final result = (await getAttributes().sendStanza(
    StanzaDetails(
      Stanza.iq(
        type: 'set',
        children: [
          XMLNode.xmlns(
            tag: 'unblock',
            xmlns: blockingXmlns,
            children: items
                .map(
                  (item) => XMLNode(
                    tag: 'item',
                    attributes: {
                      'jid': item,
                    },
                  ),
                )
                .toList(),
          ),
        ],
      ),
    ),
  ))!;

  return result.attributes['type'] == 'result';
}