Skip to content

fix: update default timeout values for MTProto settings#270

Merged
DanielLavrushin merged 1 commit into
mainfrom
fix-ui-mtproto
Jul 4, 2026
Merged

fix: update default timeout values for MTProto settings#270
DanielLavrushin merged 1 commit into
mainfrom
fix-ui-mtproto

Conversation

@DanielLavrushin

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 4, 2026 22:40
@DanielLavrushin DanielLavrushin merged commit 7160ee8 into main Jul 4, 2026
1 of 2 checks passed
@DanielLavrushin DanielLavrushin deleted the fix-ui-mtproto branch July 4, 2026 22:40
@sonarqubecloud

sonarqubecloud Bot commented Jul 4, 2026

Copy link
Copy Markdown

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts how the MTProto settings UI derives displayed values for tcp_user_timeout_sec and idle_timeout_sec from config, changing the fallback logic used when values are missing.

Changes:

  • Switched the fallback operator for MTProto timeout fields from nullish coalescing (??) to boolean OR (||) in the settings form.
  • Kept the same numeric defaults (120s and 300s) but changed when those defaults apply (now also applies for 0).

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

<B4NumberField
label={t("settings.MTProto.tcpUserTimeout")}
value={config.system.mtproto?.tcp_user_timeout_sec ?? 120}
value={config.system.mtproto?.tcp_user_timeout_sec || 120}
<B4NumberField
label={t("settings.MTProto.idleTimeout")}
value={config.system.mtproto?.idle_timeout_sec ?? 300}
value={config.system.mtproto?.idle_timeout_sec || 300}
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.

2 participants