Compare commits
3 Commits
Kordophone
...
Kordophone
| Author | SHA1 | Date | |
|---|---|---|---|
| b92c683a0e | |||
|
|
37ff0b375f | ||
|
|
d071e68a56 |
@@ -13,6 +13,7 @@
|
|||||||
#import "MBIMBridgeOperation.h"
|
#import "MBIMBridgeOperation.h"
|
||||||
#import "MBIMAuthToken.h"
|
#import "MBIMAuthToken.h"
|
||||||
#import "MBIMUpdateQueue.h"
|
#import "MBIMUpdateQueue.h"
|
||||||
|
#import "MBIMURLUtilities.h"
|
||||||
|
|
||||||
#import <Security/Security.h>
|
#import <Security/Security.h>
|
||||||
#import <CocoaHTTPServer/HTTPMessage.h>
|
#import <CocoaHTTPServer/HTTPMessage.h>
|
||||||
@@ -130,7 +131,14 @@
|
|||||||
{
|
{
|
||||||
NSURL *url = [NSURL URLWithString:path];
|
NSURL *url = [NSURL URLWithString:path];
|
||||||
NSString *endpointName = [url lastPathComponent];
|
NSString *endpointName = [url lastPathComponent];
|
||||||
|
NSString *authTokenString = [url valueForQueryItemWithName:@"token"];
|
||||||
|
MBIMAuthToken *authToken = [[MBIMAuthToken alloc] initWithTokenString:authTokenString];
|
||||||
|
|
||||||
if ([endpointName isEqualToString:@"updates"]) {
|
if ([endpointName isEqualToString:@"updates"]) {
|
||||||
|
if (![authToken isValid]) {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
return [[MBIMUpdateQueue sharedInstance] vendUpdateWebSocketConsumerForRequest:request socket:asyncSocket];
|
return [[MBIMUpdateQueue sharedInstance] vendUpdateWebSocketConsumerForRequest:request socket:asyncSocket];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,9 @@
|
|||||||
MBIMLogInfo(@"Chat does not exist: %@", chatGUID);
|
MBIMLogInfo(@"Chat does not exist: %@", chatGUID);
|
||||||
result = NO;
|
result = NO;
|
||||||
} else {
|
} else {
|
||||||
[chat sendMessage:reply];
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
[chat sendMessage:reply];
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "IMChat+Encoded.h"
|
#import "IMChat+Encoded.h"
|
||||||
|
#import "IMMessageItem+Encoded.h"
|
||||||
#import "MBIMHTTPUtilities.h"
|
#import "MBIMHTTPUtilities.h"
|
||||||
|
|
||||||
@implementation IMChat (Encoded)
|
@implementation IMChat (Encoded)
|
||||||
@@ -22,6 +23,7 @@
|
|||||||
IMMessage *lastMessage = [self lastMessage];
|
IMMessage *lastMessage = [self lastMessage];
|
||||||
if (lastMessage) {
|
if (lastMessage) {
|
||||||
chatDict[@"lastMessagePreview"] = [lastMessage descriptionForPurpose:IMMessageDescriptionConversationList];
|
chatDict[@"lastMessagePreview"] = [lastMessage descriptionForPurpose:IMMessageDescriptionConversationList];
|
||||||
|
chatDict[@"lastMessage"] = [lastMessage mbim_dictionaryRepresentation];
|
||||||
}
|
}
|
||||||
|
|
||||||
NSMutableArray *participantStrings = [NSMutableArray array];
|
NSMutableArray *participantStrings = [NSMutableArray array];
|
||||||
|
|||||||
Reference in New Issue
Block a user