invokeAllClients method
invoke request all client
Implementation
Stream<TdlibInvokeResult> invokeAllClients(
String method, {
Map? parameters,
bool isVoid = false,
bool? isUseCache,
Duration? durationCacheExpire,
Duration? delayDuration,
Duration? invokeTimeOut,
String? extra,
}) async* {
for (int clientId in getAllClientIds()) {
try {
Map result = await invoke(
method,
parameters: parameters,
isUseCache: isUseCache,
durationCacheExpire: durationCacheExpire,
clientId: clientId,
isVoid: isVoid,
delayDuration: delayDuration,
invokeTimeOut: invokeTimeOut,
extra: extra,
isInvokeThrowOnError: false,
);
yield TdlibInvokeResult(
client_id: clientId,
result: result,
);
} catch (e) {
if (e is Map) {
yield TdlibInvokeResult(
client_id: clientId,
result: e,
);
}
}
}
}