Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Issue582 #597

Merged
merged 3 commits into from
Sep 21, 2020
Merged

Issue582 #597

merged 3 commits into from
Sep 21, 2020

Conversation

mikehelmick
Copy link
Contributor

Fixes #536
Fixes #582

Proposed Changes

  • EN Express links will use the enx-redirect service when possible. If the redirect domain isn't configured, the legacy ens:// links are preserved
  • suggest links are for mobile (we're really character constrained) // feels like perf

Release Note

For ENX enabled domains, take advantage of the enx-redirect service for https:// clickable links / universal links / ens:// redirect.

@google-cla google-cla bot added the cla: yes Auto: added by CLA bot when all committers have signed a CLA. label Sep 19, 2020
pkg/controller/realmadmin/express.go Outdated Show resolved Hide resolved
} else {
text = strings.ReplaceAll(text, SMSENExpressLink,
fmt.Sprintf("https://%s.%s/v?c=%s",
strings.ToLower(r.RegionCode),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we currently enforce uniqueness on region codes right now, just realm names. Should we add a database constraint for that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can file an issue for that. I'm not confident it would help anything since it's only specific to one sever

pkg/database/realm_test.go Outdated Show resolved Hide resolved
@sethvargo
Copy link
Member

I think it needs a rebase

Copy link
Member

@sethvargo sethvargo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@@ -180,27 +180,39 @@
{{if $realm.EnableENExpress}}
Your SMS template <em>MUST</em> contain <code>[enslink]</code>.
<ul>
<li><code>[enslink]</code> Inserts the required EN Express link of: <code>ens://v?r=[region]&c=[longcode]</code></li>
{{if eq "" .enxRedirectDomain}}
<li><code>[enslink]</code> Inserts the required EN Express link of: <code>ens://v?r=[region]&c=[longcode]</code></li> <li><code>[enslink]</code> Inserts the required EN Express link of: <code>ens://v?r=[region]&c=[longcode]</code></li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like this line is twice (see column like 120)

@@ -180,27 +180,39 @@
{{if $realm.EnableENExpress}}
Your SMS template <em>MUST</em> contain <code>[enslink]</code>.
<ul>
<li><code>[enslink]</code> Inserts the required EN Express link of: <code>ens://v?r=[region]&c=[longcode]</code></li>
{{if eq "" .enxRedirectDomain}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can just do {{if .enxRedirectDomain}}

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mikehelmick, sethvargo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [mikehelmick,sethvargo]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-robot google-oss-robot merged commit 60b968c into google:main Sep 21, 2020
@google google locked and limited conversation to collaborators Oct 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Auto: added by CLA bot when all committers have signed a CLA.
Projects
None yet
3 participants