Private
Public Access
1
0

Bit of cleanup

This commit is contained in:
James Magahern
2018-11-12 22:15:50 -08:00
parent 2d0fd5b290
commit 7a3dee7073

View File

@@ -16,7 +16,7 @@
#import <IMFoundation/IMFoundation.h>
#import <IMFoundation/IMFoundation_Private.h>
static NSString *const MBIMBridgeToken = @"net.buzzert.MBIMBridge";
static NSString *const MBIMBridgeToken = @"net.buzzert.kordophone";
static NSString *const kAPIEndpointConversationList = @"conversations";
static NSString *const kAPIEndpointConversationContents = @"messages";
@@ -93,19 +93,9 @@ static NSString *const kAPIEndpointSendMessage = @"sendMessage";
- (void)_messageReceived:(NSNotification *)notification
{
NSLog(@"Received!");
NSLog(@"Received message from chat with GUID: %@", [[notification object] guid]);
// Sending a message
/*
IMAccount *iMessageAccount = [[IMAccountController sharedInstance] bestAccountForService:[IMServiceImpl iMessageService]];
IMHandle *handle = [[iMessageAccount arrayOfAllIMHandles] firstObject];
NSAttributedString *replyAttrString = [[NSAttributedString alloc] initWithString:@"This is a test automated reply. Please ignore."];
IMMessage *reply = [IMMessage fromMeIMHandle:handle withText:replyAttrString fileTransferGUIDs:@[] flags:kIMMessageFinished];
IMChat *chat = [notification object];
[chat sendMessage:reply];
*/
// TODO: Notify observers or something
}
- (void)_chatRegistryDidLoad:(NSNotification *)notification
@@ -243,29 +233,30 @@ static NSString *const kAPIEndpointSendMessage = @"sendMessage";
- (void)daemonControllerWillConnect
{
NSLog(@"About to connect to daemon");
NSLog(@"Connecting to imagent...");
}
- (void)daemonControllerDidConnect
{
NSLog(@"Did connect to daemon");
NSLog(@"imagent responded.");
IMAccount *iMessageAccount = [[IMAccountController sharedInstance] bestAccountForService:[IMServiceImpl iMessageService]];
if (iMessageAccount) {
NSLog(@"Successfully got accounts from imagent");
NSLog(@"iMessage account connected: %@", iMessageAccount);
} else {
NSLog(@"Was not able to connect to iMessage account");
NSLog(@"imagent returned no accounts (not entitled?)");
}
}
- (void)daemonControllerDidDisconnect
{
NSLog(@"Did disconnect from daemon");
NSLog(@"Disconnected from imagent");
}
- (void)daemonConnectionLost
{
NSLog(@"Connection lost to daemon");
NSLog(@"Connection lost to imagent");
}
@end