Skip to content

Conversation

@larkox
Copy link
Contributor

@larkox larkox commented Nov 29, 2025

Summary

When we login normally, we check the push notifications during the add a server flow.

On magic link, we are omitting that step, so we need to do the check afterwards.

Ticket Link

Fix https://mattermost.atlassian.net/browse/MM-66711

Release Note

No release note needed since it will be out in the same release as the feature

NONE

@larkox larkox requested review from a team, Rajat-Dabade, Copilot and lindalumitchell and removed request for a team November 29, 2025 12:00
@larkox larkox added 2: Dev Review Requires review by a core commiter 3: QA Review Requires review by a QA tester labels Nov 29, 2025
@larkox larkox requested review from a team and fmartingr and removed request for a team November 29, 2025 12:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds push notification capability verification for magic link login flow to match the behavior of normal login. This ensures push notifications are properly enabled after authentication via magic link, similar to how they're verified during the standard add-a-server flow.

  • Added push notification check after successful magic link authentication
  • Calls doPing to verify server push notification capabilities
  • Shows push notification prompts if needed using the user's locale

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

client.setCSRFToken(csrfToken);

// Check push notification capability (similar to normal login flow)
const pingResult = await doPing(serverUrlToUse, true, undefined, undefined, client);
Copy link

Copilot AI Nov 29, 2025

Choose a reason for hiding this comment

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

[nitpick] The multiple undefined parameters make the function call unclear. Consider using named parameters or an options object for doPing, or add comments explaining what each parameter represents.

Suggested change
const pingResult = await doPing(serverUrlToUse, true, undefined, undefined, client);
const pingResult = await doPing(
serverUrlToUse, // serverUrl
true, // isMobile
undefined, // token
undefined, // deviceId
client, // client
);

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@github-actions
Copy link

github-actions bot commented Nov 29, 2025

Coverage Comparison Report

Generated on December 12, 2025 at 16:12:44 UTC

+-----------------+------------+------------+-----------+
| Metric          | Main       | This PR    | Diff      |
+-----------------+------------+------------+-----------+
| Lines           |     86.18% |     86.16% |    -0.02% |
| Statements      |     86.06% |     86.04% |    -0.02% |
| Branches        |     72.61% |     72.59% |    -0.02% |
| Functions       |     85.40% |     85.40% |     0.00% |
+-----------------+------------+------------+-----------+
| Total           |     82.56% |     82.54% |    -0.02% |
+-----------------+------------+------------+-----------+

@amyblais amyblais added this to the v2.36.0 milestone Dec 1, 2025
@amyblais amyblais removed the 2: Dev Review Requires review by a core commiter label Dec 4, 2025
@lindalumitchell lindalumitchell added the Build Apps for PR Build the mobile app for iOS and Android to test label Dec 10, 2025
@lindalumitchell
Copy link
Contributor

@larkox I'm having trouble with this one, on both iOS and Android. Here's what I'm doing:

  1. Install the PR build of the app on mobile device, close the app
  2. Have another user send me a magic link invitation
  3. Open the invitation email on mobile and tap the link to join the server
  4. Select to open in the app

Observed: A brief Mattermost logo loading screen, but then it disappears and nothing else loads on the screen. It is completely blank.
Expected: I join the server and I'm logged in and viewing it

@amyblais amyblais added the CherryPick/Approved Meant for the quality or patch release tracked in the milestone label Dec 11, 2025
@larkox
Copy link
Contributor Author

larkox commented Dec 12, 2025

@lindalumitchell I added something that was missing to the PR to actually work, but it is completely unrelated to the issue you were facing :(

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

Labels

3: QA Review Requires review by a QA tester Build Apps for PR Build the mobile app for iOS and Android to test CherryPick/Approved Meant for the quality or patch release tracked in the milestone release-note-none

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants