ObjMatrix  Diff

Differences From Artifact [00b0c5338a]:

To Artifact [ebe5b898bb]:


199
200
201
202
203
204
205




206

207
208
209
210
211
212
213
199
200
201
202
203
204
205
206
207
208
209

210
211
212
213
214
215
216
217







+
+
+
+
-
+







- (void)syncWithTimeout: (of_time_interval_t)timeout
		  block: (mtx_client_response_block_t)block
{
	void *pool = objc_autoreleasePoolPush();
	MTXRequest *request = [self
	    requestWithPath: @"/_matrix/client/r0/sync"];
	unsigned long long timeoutMs = timeout * 1000;
	OFMutableDictionary<OFString *, OFString *> *query =
	    [OFMutableDictionary dictionaryWithObject: @(timeoutMs).stringValue
					       forKey: @"timeout"];
	query[@"since"] = [_storage nextBatchForDeviceID: _deviceID];
	request.query = [OFString stringWithFormat: @"timeout=%llu", timeoutMs];
	request.query = query;
	[request performWithBlock: ^ (mtx_response_t response, int statusCode,
				       id exception) {
		if (exception != nil) {
			block(exception);
			return;
		}