feat: set presence in sync

This commit is contained in:
Lukas Lihotzki 2020-12-09 16:02:42 +01:00
parent f85ef5ed60
commit 88888a43f1
1 changed files with 4 additions and 0 deletions

View File

@ -797,6 +797,9 @@ class Client extends MatrixApi {
return _currentSync; return _currentSync;
} }
/// Presence that is set on sync.
PresenceType syncPresence;
Future<void> _innerSync() async { Future<void> _innerSync() async {
await _retryDelay; await _retryDelay;
_retryDelay = Future.delayed(Duration(seconds: syncErrorTimeoutSec)); _retryDelay = Future.delayed(Duration(seconds: syncErrorTimeoutSec));
@ -806,6 +809,7 @@ class Client extends MatrixApi {
filter: syncFilters, filter: syncFilters,
since: prevBatch, since: prevBatch,
timeout: prevBatch != null ? 30000 : null, timeout: prevBatch != null ? 30000 : null,
setPresence: syncPresence,
); );
if (_disposed) return; if (_disposed) return;
if (database != null) { if (database != null) {