Skip to content

Add TOTP copy button to messages that look like they have a TOTP code and fix undefined in notification#2111

Open
xethlyx wants to merge 2 commits intoGSConnect:mainfrom
xethlyx:main
Open

Add TOTP copy button to messages that look like they have a TOTP code and fix undefined in notification#2111
xethlyx wants to merge 2 commits intoGSConnect:mainfrom
xethlyx:main

Conversation

@xethlyx
Copy link

@xethlyx xethlyx commented Dec 26, 2025

Pictures are worth a thousand words, so here's a before and after:

Before After
Screenshot From 2025-12-25 20-17-14 Screenshot From 2025-12-25 20-15-16

Closes #1588
Closes #1108

Since phone numbers can look a lot like TOTP codes, to minimize the amount of false positives, I only opted to include codes that matched 6 digits with whitespace before/after.

If necessary, I can split this into two pull requests. Happy holidays!

EDIT: After daily driving these patches, I noticed some TOTP providers may add a period at the end of the code, e.g. Your code is 123456.. I've amended the logic to also allow periods.

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.

(T)OTP quick copy "undefined" in Notification on Ubuntu 21.04

1 participant