Updates to sending and message sequences
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
#import "MBIMConversationListOperation.h"
|
||||
#import "MBIMHTTPUtilities.h"
|
||||
#import "IMChat+Encoded.h"
|
||||
|
||||
#import <IMCore/IMCore.h>
|
||||
|
||||
@@ -26,26 +27,7 @@
|
||||
|
||||
NSMutableArray *conversations = [NSMutableArray array];
|
||||
for (IMChat *chat in chats) {
|
||||
NSMutableDictionary *chatDict = [NSMutableDictionary dictionary];
|
||||
chatDict[@"guid"] = [chat guid];
|
||||
chatDict[@"displayName"] = [chat displayName];
|
||||
chatDict[@"date"] = MBIMWebServerFormatRFC822([chat lastFinishedMessageDate]);
|
||||
|
||||
IMMessage *lastMessage = [chat lastMessage];
|
||||
if (lastMessage) {
|
||||
chatDict[@"lastMessagePreview"] = [[lastMessage text] string];
|
||||
}
|
||||
|
||||
NSMutableArray *participantStrings = [NSMutableArray array];
|
||||
for (IMHandle *participantHandle in chat.participants) {
|
||||
NSString *participantString = [participantHandle displayNameForChat:chat];
|
||||
if (participantString) {
|
||||
[participantStrings addObject:participantString];
|
||||
}
|
||||
}
|
||||
|
||||
chatDict[@"participantDisplayNames"] = participantStrings;
|
||||
|
||||
NSDictionary *chatDict = [chat mbim_dictionaryRepresentation];
|
||||
[conversations addObject:chatDict];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user