瀏覽代碼

Merge pull request #3820 from nextcloud/fixNotificationResultCheck

Check result also for 202 (accepted)
Andy Scherzinger 6 年之前
父節點
當前提交
b4e1e57859
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/main/java/com/owncloud/android/jobs/NotificationJob.java

+ 2 - 1
src/main/java/com/owncloud/android/jobs/NotificationJob.java

@@ -268,7 +268,8 @@ public class NotificationJob extends Job {
 
                         boolean success;
                         if (!TextUtils.isEmpty(actionType) && !TextUtils.isEmpty(actionLink)) {
-                            success = executeAction(actionType, actionLink, client) == HttpStatus.SC_OK;
+                            int resultCode = executeAction(actionType, actionLink, client);
+                            success = resultCode == HttpStatus.SC_OK || resultCode == HttpStatus.SC_ACCEPTED;
                         } else {
                             success = new DeleteNotificationRemoteOperation(numericNotificationId)
                                 .execute(client).isSuccess();