getDehydratedDeviceEvents method

Future<DehydratedDeviceEvents> getDehydratedDeviceEvents(
  1. String deviceId, {
  2. String? nextBatch,
  3. int limit = 100,
})

fetch events sent to a dehydrated device. https://github.com/matrix-org/matrix-spec-proposals/pull/3814

Implementation

Future<DehydratedDeviceEvents> getDehydratedDeviceEvents(
  String deviceId, {
  String? nextBatch,
  int limit = 100,
}) async {
  final response = await request(
    RequestType.POST,
    '/client/unstable/org.matrix.msc3814.v1/dehydrated_device/$deviceId/events',
    query: {'limit': limit.toString()},
    data: {'next_batch': ?nextBatch},
  );
  return DehydratedDeviceEvents.fromJson(response);
}