Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
Show all 5 items in the list
Tags used for linking issues. [ID: 1172495]
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Before opening a new issue, please search for other related issues , click the ★ to subscribe to updates, and click
+1
to vote.Description
The
users.messages.modify
API endpoint is returning inconsitent responses.If the message already has a label and you try to add it with
addLabelIds
it returns back aminimal
formatted response. If the message does not have the label, it returns a message that is missing fields.The same issue occurs when using
removeLabelIds
, if the label is not on the message, it returns theminimal
formatted message, otherwise fields are missing.Examples
Add "UNREAD" label to a message that doesn't have the "UNREAD" label
Request
Response
Add "UNREAD" label to a message that already has the "UNREAD" label
Request
Response
Code
Minimalistic code to reproduce the issue in Go:
Output
Steps
users.messages.modify
for a message and add a label that doesn't exist on the message.Expected behaviour
The response from the API call should be consistent and always return a
minimal
formatted message