86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
if (exception != nil) {
of_log(@"Failed to join room %@: %@", room, exception);
[OFApplication terminateWithStatus: 1];
}
of_log(@"Joined room %@", roomID);
[self sendMessage: roomID];
}];
}
- (void)sendMessage: (OFString *)roomID
{
[_client sendMessage: @"ObjMatrix test successful!"
roomID: roomID
block: ^ (id exception) {
if (exception != nil) {
of_log(@"Failed to send message to room %@: %@",
roomID, exception);
[OFApplication terminateWithStatus: 1];
}
of_log(@"Message sent to %@", roomID);
[self leaveRoom: roomID];
}];
}
- (void)leaveRoom: (OFString *)roomID
{
[_client leaveRoom: roomID
|