Add support for sending messages
FossilOrigin-Name: cce4e8d73aefdb9a721a42b68b1c769c886d4fdb9a0a45d5bea30f41fe52d237
This commit is contained in:
parent
191a6412ae
commit
491d648e3a
6 changed files with 200 additions and 14 deletions
|
@ -90,6 +90,23 @@ OF_APPLICATION_DELEGATE(Tests)
|
|||
|
||||
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];
|
||||
}];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue