[openstreetmap/openstreetmap-website] Add social profile links (PR #5439)
David Tsiklauri
notifications at github.com
Thu May 15 08:15:23 UTC 2025
@nertc commented on this pull request.
> +#
+# Foreign Keys
+#
+# fk_rails_... (user_id => users.id)
+#
+
+class SocialLink < ApplicationRecord
+ belongs_to :user
+
+ validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :message => :http_parse_error }
+
+ URL_PATTERNS = {
+ :bluesky => %r{\Ahttps?://(?:www\.)?bsky\.app/profile/([a-zA-Z0-9\._-]+)},
+ :discord => %r{\Ahttps?://(?:www\.)?discord\.com/users/(\d+)},
+ :facebook => %r{\Ahttps?://(?:www\.)?facebook\.com/([a-zA-Z0-9.]+)},
+ :github => %r{\Ahttps?://(?:www\.)?github\.com/([a-zA-Z0-9_-]+)},
`Flickr` was added to the parser.

--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5439#discussion_r2090573060
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5439/review/2842726317 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250515/c6120e3a/attachment-0001.htm>
More information about the rails-dev
mailing list