Skip to content

Add discord domain & update validation links to support multiple domains#108

Open
madtocc wants to merge 3 commits into
trustwallet:mainfrom
madtocc:feat/validate-links-support-multiple-domains
Open

Add discord domain & update validation links to support multiple domains#108
madtocc wants to merge 3 commits into
trustwallet:mainfrom
madtocc:feat/validate-links-support-multiple-domains

Conversation

@madtocc
Copy link
Copy Markdown

@madtocc madtocc commented Sep 22, 2023

The format for Discord invitation links has recently transitioned from discord.com/invite to discord.gg/invite. Due to this change, newly established Discord groups face challenges linking their socials in asset PRs because of domain restrictions. This PR aims to address and resolve that limitation to ensure a smoother experience for asset contributors on TrustWallet's assets repository.

Changes:

Modified the "discord" key's value structure, transitioning from a single string to a slice of strings to accommodate multiple valid prefixes.
Adjusted the validation logic to correctly handle and validate the list of potential prefixes.
Introduced new tests to ensure the ValidateLinks function remains robust and now encompasses the latest changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant