[self.recentSessionssortUsingComparator:^NSComparisonResult(idobj1,idobj2) {
NIMRecentSession*item1 = obj1;
NIMRecentSession*item2 = obj2;
if(item1.lastMessage.timestamp< item2.lastMessage.timestamp) {
returnNSOrderedDescending;
}
if(item1.lastMessage.timestamp> item2.lastMessage.timestamp) {
returnNSOrderedAscending;
}
returnNSOrderedSame;
}];