# getDeviceList method

Future <Result<OmemoError, List <int>>> getDeviceList(

1. JID jid

)

Retrieves the OMEMO device list from `jid`.

## Implementation

    Future<Result<OmemoError, List<int>>> getDeviceList(JID jid) async {
      final itemsRaw = await _retrieveDeviceListPayload(jid);
      if (itemsRaw.isType<OmemoError>()) return Result(UnknownOmemoError());

      final ids = itemsRaw
          .get<XMLNode>()
          .children
          .map((child) => int.parse(child.attributes['id']! as String))
          .toList();
      return Result(ids);
    }