Skip to content

[Bug] GReader API: default category duplication #7368

@Shinokuni

Description

@Shinokuni

Describe the bug

When using the GReader API to create a new feed with explicitly specifying the default category, FreshRSS creates a new default category and links the new feed to this duplicate.

When the default folder isn't specified, FreshRSS adds the new feed to the already existing category and doesn't duplicate it.

The thing is, default category id is based on the UI language. For example, I receive mine in french:

{
      "id": "user/-/label/Sans catégorie",
      "type": "folder"
}

If I switch UI language to english:

{
      "id": "user/-/label/Uncategorized",
      "type": "folder"
}

So it's not possible to exclude the default category from the API call, as its id will be never the same.

It is worth noting that this behavior only occurs with the default category and not user created ones.

To Reproduce

  1. Make an API call with reader/api/0/subscription/edit , specify the default category with the parameter a
  2. The new feed will appear in a default category duplicate

Expected behavior

Creating a feed with the API call and specifying the default category should not create duplicates.

FreshRSS version

1.25.0

System information

  • Database version: MySQL 15.1
  • PHP version: PHP 8.3.16
  • Installation type: git
  • Web server type: Apache
  • Device: Android Emulator 35.3.11 with API 34 image

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    API 🤝API for other clientsBug (unconfirmed)issues that could not be reproduced yet

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions