diff --git a/xplan-ios/Main/Message/Api/Api+Message.h b/xplan-ios/Main/Message/Api/Api+Message.h index 85442e5e..fd6057c6 100644 --- a/xplan-ios/Main/Message/Api/Api+Message.h +++ b/xplan-ios/Main/Message/Api/Api+Message.h @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN @interface Api (Message) -+ (void)getChatLimit:(HttpRequestHelperCompletion)complection; ++ (void)getChatLimit:(HttpRequestHelperCompletion)complection receiverUid:(NSString *)receiverUid ; @end diff --git a/xplan-ios/Main/Message/Api/Api+Message.m b/xplan-ios/Main/Message/Api/Api+Message.m index ff48f497..2475c7ea 100644 --- a/xplan-ios/Main/Message/Api/Api+Message.m +++ b/xplan-ios/Main/Message/Api/Api+Message.m @@ -9,8 +9,8 @@ @implementation Api (Message) -+ (void)getChatLimit:(HttpRequestHelperCompletion)complection { - [self makeRequest:@"privateChat/limit" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, nil]; ++ (void)getChatLimit:(HttpRequestHelperCompletion)complection receiverUid:(NSString *)receiverUid { + [self makeRequest:@"privateChat/limit" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, receiverUid,nil]; } @end diff --git a/xplan-ios/Main/Message/Presenter/MessagePresenter.h b/xplan-ios/Main/Message/Presenter/MessagePresenter.h index d8451ab4..dc0e7b07 100644 --- a/xplan-ios/Main/Message/Presenter/MessagePresenter.h +++ b/xplan-ios/Main/Message/Presenter/MessagePresenter.h @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MessagePresenter : BaseMvpPresenter -- (void)getChatLimit; +- (void)getChatLimitReceiverUid:(NSString *)receiverUid; @end diff --git a/xplan-ios/Main/Message/Presenter/MessagePresenter.m b/xplan-ios/Main/Message/Presenter/MessagePresenter.m index 371ab0fc..76d9a552 100644 --- a/xplan-ios/Main/Message/Presenter/MessagePresenter.m +++ b/xplan-ios/Main/Message/Presenter/MessagePresenter.m @@ -12,11 +12,11 @@ @implementation MessagePresenter -- (void)getChatLimit { +- (void)getChatLimitReceiverUid:(NSString *)receiverUid { [Api getChatLimit:[self createHttpCompletion:^(BaseModel * _Nonnull data) { ChatLimitModel *chatLimit = [ChatLimitModel modelWithJSON:data.data]; [[self getView] onGetLimitChat:chatLimit]; - } showLoading:NO errorToast:NO]]; + } showLoading:NO errorToast:NO] receiverUid:receiverUid]; } @end diff --git a/xplan-ios/Main/Message/View/Session/SessionViewController.m b/xplan-ios/Main/Message/View/Session/SessionViewController.m index c545ab84..7d0fd6b6 100644 --- a/xplan-ios/Main/Message/View/Session/SessionViewController.m +++ b/xplan-ios/Main/Message/View/Session/SessionViewController.m @@ -98,7 +98,7 @@ [[NIMSDK sharedSDK].conversationManager markAllMessagesReadInSession:self.session]; - [self.presenter getChatLimit]; + [self.presenter getChatLimitReceiverUid:self.session.sessionId]; } - (void)keyboardWillShow:(NSNotification *)notification {