Skip to content

Improve restriction for adding same link #13

@nyudenkov

Description

@nyudenkov

Bot already checking for the same link in handler (app/bot/handlers/link.py:45).
Maybe it would be nice to move check in method for Link model class (app.database.models.Link)

Cover next cases:

  • Slashes (?) (fox ex. now fmajesty.xyz and fmajesty.xyz/ is not the same link)
  • Redirects (for ex. user trying to add redirect.to/fmajesty.xyz link where there is redirect to fmajesty.xyz/ and we have record in DB with link fmajesty.xyz, so we need to restrict adding that link)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Todo

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions