Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value of total unread emails is wrong when message assigned multiple labels #1354

Open
6 tasks done
joaomlneto opened this issue Jun 24, 2023 · 0 comments
Open
6 tasks done

Comments

@joaomlneto
Copy link

Bug

We can retrieve the number of total unread emails of a character via the /characters/{character_id}/mail/labels/ endpoint.

However, the number of unread emails is not calculated correctly when an unread message is assigned more than one label.

For instance, let's consider we have a single unread message that is assigned two labels (plus Sent):
image

Querying the ESI endpoint will return a 200 status with the following body:

{
    "labels": [
        {
            "color": "#ffff01",
            "label_id": 1,
            "name": "Inbox",
            "unread_count": 1
        },
        {
            "color": "#fe0000",
            "label_id": 2,
            "name": "Sent"
        },
        {
            "color": "#01ffff",
            "label_id": 4,
            "name": "[Corp]",
            "unread_count": 0
        },
        {
            "color": "#00ff33",
            "label_id": 8,
            "name": "[Alliance]",
            "unread_count": 0
        },
        {
            "color": "#00ff33",
            "label_id": 32,
            "name": "grrreeen",
            "unread_count": 0
        },
        {
            "color": "#660066",
            "label_id": 16,
            "name": "purrple",
            "unread_count": 1
        }
    ],
    "total_unread_count": 2
}

The total_unread_count should display 1 (as is correctly displayed in the EVE client). However, it appears to simply add the number of unread messages on each label.

Assigning a third label to this message will cause the total_unread_count to change to 3, etc…

Checklist

Check all boxes that apply to this issue:

  • Bug description is provided
  • Request path is provided
  • Response status code is provided
  • Response headers are provided — not relevant
  • Response body is provided
  • Expected response is provided
@joaomlneto joaomlneto changed the title Value of total unread emails is wrong Value of total unread emails is wrong when message assigned multiple labels Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants