Browse Source

IOSAD-178 fixes: input rating == output rating due to originalRating and resulting rating not differenciated.

IOSAD-178
buff 2 years ago
parent
commit
4f8582bd04
3 changed files with 11 additions and 8 deletions
  1. +1
    -1
      PEPObjCAdapterFramework/PEPAsyncSession.h
  2. +1
    -1
      pEpObjCAdapter/PEPAsyncSession.m
  3. +9
    -6
      pEpObjCAdapter/PEPInternalSession.m

+ 1
- 1
PEPObjCAdapterFramework/PEPAsyncSession.h View File

@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)reEvaluateMessage:(PEPMessage *)message
xKeyList:(PEPStringList *_Nullable)xKeyList
rating:(PEPRating)originalRating
originalRating:(PEPRating)originalRating
errorCallback:(void (^)(NSError *error))errorCallback
successCallback:(void (^)(PEPRating rating))successCallback;


+ 1
- 1
pEpObjCAdapter/PEPAsyncSession.m View File

@ -64,7 +64,7 @@ static dispatch_queue_t queue;
- (void)reEvaluateMessage:(PEPMessage *)message //BUFF: done
xKeyList:(PEPStringList *_Nullable)xKeyList
rating:(PEPRating)originalRating
originalRating:(PEPRating)originalRating
errorCallback:(void (^)(NSError *error))errorCallback
successCallback:(void (^)(PEPRating rating))successCallback
{


+ 9
- 6
pEpObjCAdapter/PEPInternalSession.m View File

@ -200,14 +200,17 @@ void decryptMessageDictFree(message *src, message *dst, stringlist_t *extraKeys)
theKeys = PEP_arrayToStringlist(xKeyList);
}
__block PEPRating theRating = *rating;
PEPRating originalRating = *rating;
__block PEPRating resultRating = PEPRatingUndefined;
PEPStatus theStatus = (PEPStatus) [self runWithPasswords:^PEP_STATUS(PEP_SESSION session) {
return re_evaluate_message_rating(session,
_src,
theKeys,
(PEP_rating) theRating,
(PEP_rating *) &theRating);
PEP_STATUS tmpStatus = re_evaluate_message_rating(session,
_src,
theKeys,
(PEP_rating) originalRating,
(PEP_rating *) &resultRating);
*rating = resultRating;
return tmpStatus;
}];
free_message(_src);


Loading…
Cancel
Save