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

Add Discord field to user profiles #3033

Merged
merged 13 commits into from Apr 18, 2018
Merged

Add Discord field to user profiles #3033

merged 13 commits into from Apr 18, 2018

Conversation

nekodex
Copy link
Collaborator

@nekodex nekodex commented Apr 18, 2018

(reuses the existing user_jabber field for now until we can rename the database column)

fixes #1286 (but doesn't nuke skype)

// This is a basic check and not 100% compliant to Discord's spec, only validates that input:
// - is a 2-32 char username (excluding chars @#:)
// - ends with a # and 4-digit discriminator (number being greater than 0000)
if (!preg_match('/^[^@#:]{2,32}#\d{3}[1-9]$/i', $this->user_discord)) {

This comment was marked as off-topic.

onClick: @click
title: osu.trans('common.buttons.click_to_copy')
'data-tooltip-pin-position': true
a

This comment was marked as off-topic.

click: (e) =>
e.preventDefault()
el = e.currentTarget
api = @state.api || $(el).qtip('api')

This comment was marked as off-topic.


@setState
qtip: api
title: el.getAttribute('title') || el.dataset.origTitle

This comment was marked as off-topic.

api.set 'content.text', osu.trans('common.buttons.click_to_copy_copied')

# set timer to reset tooltip text
if @state.timer?

This comment was marked as off-topic.

@nanaya nanaya merged commit 4238996 into ppy:master Apr 18, 2018
@nekodex nekodex deleted the discord-profile branch June 21, 2019 04:03
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.

Discord area on profile
2 participants