Skip to content

Commit

Permalink
Explicitly have draft messages inherit from the list class
Browse files Browse the repository at this point in the history
  • Loading branch information
jimhester committed May 31, 2016
1 parent b3ee3ea commit 6d5bbca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/draft.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ draft <- function(id,
format <- match.arg(format)
res <- gmailr_GET(c("drafts", id), user_id, query = list(format=format), class = "gmail_draft")

class(res$message) <- "gmail_message"
class(res$message) <- c("gmail_message", "list")

res
}
Expand Down Expand Up @@ -71,7 +71,7 @@ create_draft <- function(mail,
add_headers("Content-Type" = "application/json"))

# This is labeled as a message but is really a thread
class(res$message) <- "gmail_thread"
class(res$message) <- c("gmail_thread", "list")
res
}

Expand Down

0 comments on commit 6d5bbca

Please sign in to comment.