Skip to content

Commit

Permalink
Revert "JMAP: treat IMAP_NO_OVERQUOTA the same as IMAP_QUOTA_EXCEEDED"
Browse files Browse the repository at this point in the history
This reverts commit 0772404.
  • Loading branch information
ksmurchison committed May 15, 2024
1 parent 1513790 commit cfe4c2c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
2 changes: 0 additions & 2 deletions imap/jmap_calendar.c
Original file line number Diff line number Diff line change
Expand Up @@ -4767,7 +4767,6 @@ static void setcalendarevents_create(jmap_req_t *req,
*errptr = json_pack("{s:s}", "type", "forbidden");
break;
case IMAP_QUOTA_EXCEEDED:
case IMAP_NO_OVERQUOTA:
*errptr = json_pack("{s:s}", "type", "overQuota");
break;
case IMAP_MESSAGE_TOO_LARGE:
Expand Down Expand Up @@ -5801,7 +5800,6 @@ static void setcalendarevents_update(jmap_req_t *req,
break;
case HTTP_NO_STORAGE:
case IMAP_QUOTA_EXCEEDED:
case IMAP_NO_OVERQUOTA:
*err = json_pack("{s:s}", "type", "overQuota");
break;
case IMAP_MESSAGE_TOO_LARGE:
Expand Down
2 changes: 0 additions & 2 deletions imap/jmap_contact.c
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,6 @@ static void _contacts_set(struct jmap_req *req, unsigned kind,
err = json_pack("{s:s}", "type", "forbidden");
break;
case IMAP_QUOTA_EXCEEDED:
case IMAP_NO_OVERQUOTA:
err = json_pack("{s:s}", "type", "overQuota");
break;
case IMAP_MESSAGE_TOO_LARGE:
Expand Down Expand Up @@ -1207,7 +1206,6 @@ static void _contacts_set(struct jmap_req *req, unsigned kind,
err = json_pack("{s:s}", "type", "forbidden");
break;
case IMAP_QUOTA_EXCEEDED:
case IMAP_NO_OVERQUOTA:
err = json_pack("{s:s}", "type", "overQuota");
break;
case IMAP_MESSAGE_TOO_LARGE:
Expand Down
3 changes: 1 addition & 2 deletions imap/jmap_mail.c
Original file line number Diff line number Diff line change
Expand Up @@ -9027,7 +9027,6 @@ static void _email_append(jmap_req_t *req,
*err = json_pack("{s:s s:s}", "type", "alreadyExists", "existingId", detail->email_id);
break;
case IMAP_QUOTA_EXCEEDED:
case IMAP_NO_OVERQUOTA:
*err = json_pack("{s:s}", "type", "overQuota");
break;
case IMAP_MESSAGE_CONTAINSNULL:
Expand Down Expand Up @@ -10925,7 +10924,7 @@ static void _email_create(jmap_req_t *req,
done:
if (r && *set_err == NULL) {
syslog(LOG_ERR, "jmap: email_create: %s", error_message(r));
if (r == IMAP_QUOTA_EXCEEDED || r == IMAP_NO_OVERQUOTA)
if (r == IMAP_QUOTA_EXCEEDED)
*set_err = json_pack("{s:s}", "type", "overQuota");
else
*set_err = jmap_server_error(r);
Expand Down

0 comments on commit cfe4c2c

Please sign in to comment.