ObjMatrix  Diff

Differences From Artifact [16dc45e5ea]:

To Artifact [53ee119d97]:


31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

@implementation Tests
{
	MTXClient *_client;
	OFString *_roomID;
}

- (void)applicationDidFinishLaunching
{
	__auto_type environment = OFApplication.environment;
	if (environment[@"OBJMATRIX_USER"] == nil ||
	    environment[@"OBJMATRIX_PASS"] == nil ||
	    environment[@"OBJMATRIX_HS"] == nil) {
		[OFStdErr writeString: @"Please set OBJMATRIX_USER, "
				       @"OBJMATRIX_PASS and OBJMATRIX_HS in "
				       @"the environment!\n"];
		[OFApplication terminateWithStatus: 1];
	}

	OFURL *homeserver = [OFURL URLWithString: environment[@"OBJMATRIX_HS"]];
	id <MTXStorage> storage =
	    [MTXSQLite3Storage storageWithPath: @"tests.db"];
	[MTXClient logInWithUser: environment[@"OBJMATRIX_USER"]
			password: environment[@"OBJMATRIX_PASS"]
		      homeserver: homeserver
			 storage: storage
			   block: ^ (MTXClient *client, id exception) {







|











|







31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

@implementation Tests
{
	MTXClient *_client;
	OFString *_roomID;
}

- (void)applicationDidFinishLaunching: (OFNotification *)notification
{
	__auto_type environment = OFApplication.environment;
	if (environment[@"OBJMATRIX_USER"] == nil ||
	    environment[@"OBJMATRIX_PASS"] == nil ||
	    environment[@"OBJMATRIX_HS"] == nil) {
		[OFStdErr writeString: @"Please set OBJMATRIX_USER, "
				       @"OBJMATRIX_PASS and OBJMATRIX_HS in "
				       @"the environment!\n"];
		[OFApplication terminateWithStatus: 1];
	}

	OFIRI *homeserver = [OFIRI IRIWithString: environment[@"OBJMATRIX_HS"]];
	id <MTXStorage> storage =
	    [MTXSQLite3Storage storageWithPath: @"tests.db"];
	[MTXClient logInWithUser: environment[@"OBJMATRIX_USER"]
			password: environment[@"OBJMATRIX_PASS"]
		      homeserver: homeserver
			 storage: storage
			   block: ^ (MTXClient *client, id exception) {