41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
[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) {
if (exception != nil) {
OFLog(@"Error logging in: %@", exception);
|
>
|
|
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
[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"]];
OFIRI *storageIRI = [OFIRI fileIRIWithPath: @"tests.db"];
id <MTXStorage> storage =
[MTXSQLite3Storage storageWithIRI: storageIRI];
[MTXClient logInWithUser: environment[@"OBJMATRIX_USER"]
password: environment[@"OBJMATRIX_PASS"]
homeserver: homeserver
storage: storage
block: ^ (MTXClient *client, id exception) {
if (exception != nil) {
OFLog(@"Error logging in: %@", exception);
|