HomePhabricator
Diffusion Comm 68daf10f8ff6

[keyserver][lib] Deduplicate invite link RegExps

Description

[keyserver][lib] Deduplicate invite link RegExps

Summary:
While working on ENG-8263, I noticed we have this defined in three different places, in slightly different (but equivalent) ways.

In one case we separately enumerate A-Z and a-z as options, whereas in the other case we just use a-z and add the suffix i to indicate that the match is case-insensitive.

This diff dedups the three RegExps. I opted to standarize on the approach that avoids the i modifier, since I needed to represent the RegExp in raw string form for one usage.

Test Plan:

  1. Flow
  2. Tested invite link flow end-to-end on web by creating an invite link as a keyserver admin, and then opening it in an Incognito tab as another user, and confirming I am able to join

Opted not to test native at all, but can test that too if helpful, and especially if we suspect this RegExp is further duplicated elsewhere.

Reviewers: tomek

Reviewed By: tomek

Differential Revision: https://phab.comm.dev/D12241

Details

Provenance
ashoatAuthored on May 29 2024, 10:51 AM
Reviewer
tomek
Differential Revision
D12241: [keyserver][lib] Deduplicate invite link RegExps
Parents
rCOMMdcbb63430b3d: [lib][native] Move device list ops to lib
Branches
Unknown
Tags
Unknown