messagix/bloks: implement timer cancel function#301
Open
Fizzadar wants to merge 1 commit into
Open
Conversation
| if err != nil { | ||
| if ctxErr := ctx.Err(); ctxErr != nil { | ||
| if errors.Is(ctxErr, context.DeadlineExceeded) { | ||
| return nil, ErrLoginAFADTimeout |
Collaborator
There was a problem hiding this comment.
This seems wrong. If there is a context error then that means the user is gone already, but you're trying to return an error that is intended to display to the user.
Member
Author
There was a problem hiding this comment.
Fixed, in testing against the debug payloads I also spotted that every cancel function also displayed screen com.bloks.www.approve_from_another_device.xmds.challenged_device_denied so I've added support for that in here too.
radon-at-beeper
approved these changes
Jul 14, 2026
Fizzadar
force-pushed
the
nick/messenger-lite-timeout-cancel
branch
from
July 16, 2026 10:59
8de459a to
2eb2809
Compare
Based on bloks debug payload, we see the timer get cancelled and immediately
restarted, without this change we error at the cancel. Bloks debug payload:
```
TakeLast(
If( is_timer_running AND approval_id != "XXX", ← this page's approval id
{ timer.Cancel(GetArg 0, "approve_from_another_device_polling_timer")
is_timer_running := false }, ← kill a STALE timer
null ),
If( is_timer_running,
null, ← already running: no-op
{ is_timer_running := true
timer.Start(GetArg 0, 2000, true, ← restart: poll every 2000ms
λ: If(is_loading, null,
invoke "com.bloks.www.two_step_verification.afad_state.async" ...),
"approve_from_another_device_polling_timer") } )
)
```
Fizzadar
force-pushed
the
nick/messenger-lite-timeout-cancel
branch
from
July 16, 2026 11:13
2eb2809 to
7bbbebd
Compare
radon-at-beeper
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on bloks debug payload, we see the timer get cancelled and immediately restarted, without this change we error at the cancel. Bloks debug payload: