|
@@ -1354,6 +1354,8 @@
|
|
|
|
|
|
- (void)getActivityWithAccount:(NSString *)account since:(NSInteger)since limit:(NSInteger)limit completion:(void(^)(NSString *account, NSArray *listOfActivity, NSString *message, NSInteger errorCode))completion
|
|
|
{
|
|
|
+ BOOL previews = false;
|
|
|
+
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
@@ -1364,7 +1366,12 @@
|
|
|
[communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
|
|
|
[communication setUserAgent:[CCUtility getUserAgent]];
|
|
|
|
|
|
- [communication getActivityServer:[tableAccount.url stringByAppendingString:@"/"] since:since limit:limit onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSArray *listOfActivity, NSString *redirectedServer) {
|
|
|
+ tableCapabilities *capabilities = [[NCManageDatabase sharedInstance] getCapabilitesWithAccount:account];
|
|
|
+ if (capabilities != nil && capabilities.versionMajor >= k_nextcloud_version_12_0) {
|
|
|
+ previews = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ [communication getActivityServer:[tableAccount.url stringByAppendingString:@"/"] since:since limit:limit previews:previews onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSArray *listOfActivity, NSString *redirectedServer) {
|
|
|
|
|
|
completion(account, listOfActivity, nil, 0);
|
|
|
|