File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -821,6 +821,12 @@ - (JMSGOptionalContent *)convertDicToJMSGOptionalContent:(NSDictionary *)dic {
821821 return ;
822822 }
823823
824+ BOOL isDescend = false ;
825+ if (param[@" isDescend" ]) {
826+ NSNumber *number = param[@" isDescend" ];
827+ isDescend = [number boolValue ];
828+ }
829+
824830 [self getConversationWithDictionary: param callback: ^(JMSGConversation *conversation, NSError *error) {
825831 if (error) {
826832 failCallback (@[[error errorToDictionary ]]);
@@ -832,12 +838,16 @@ - (JMSGOptionalContent *)convertDicToJMSGOptionalContent:(NSDictionary *)dic {
832838 JMSGMessage *message = obj;
833839 return [message messageToDictionary ];
834840 }];
835-
841+
836842 if (!messageArr) {
837843 successCallback (@[@[]]);
838844 return ;
839845 }
840846
847+ if (isDescend) {
848+ messageDicArr = [[messageDicArr reverseObjectEnumerator ] allObjects ];
849+ }
850+
841851 successCallback (@[messageDicArr]);
842852 }];
843853}
You can’t perform that action at this time.
0 commit comments