Skip to content

Fix Saved Messages name in folder add/remove toast#30464

Open
mvanhorn wants to merge 1 commit intotelegramdesktop:devfrom
mvanhorn:osc/30383-fix-saved-messages-folder-toast
Open

Fix Saved Messages name in folder add/remove toast#30464
mvanhorn wants to merge 1 commit intotelegramdesktop:devfrom
mvanhorn:osc/30383-fix-saved-messages-folder-toast

Conversation

@mvanhorn
Copy link
Copy Markdown

When adding or removing "Saved Messages" from a chat folder, the toast shows the user's real name instead of "Saved Messages."

The ChangeFilterById callback in choose_filter_box.cpp:174 captures history->peer->name() without checking isSelf(). This fix adds the same isSelf() guard used in main_window.cpp:808-810:

// Before:
chat = history->peer->name()

// After:
chat = (history->peer->isSelf()
    ? tr::lng_saved_messages(tr::now)
    : history->peer->name())

Fixes #30383

This contribution was developed with AI assistance (Claude Code).

Use isSelf() check before peer->name() in ChangeFilterById's done
callback, matching the pattern from main_window.cpp. Without this,
the toast shows the user's real name instead of "Saved Messages".
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 20, 2026

CLA assistant check
All committers have signed the CLA.

@john-preston
Copy link
Copy Markdown
Member

CLA?

@mvanhorn
Copy link
Copy Markdown
Author

image been getting an error the last hour

@mvanhorn
Copy link
Copy Markdown
Author

worked on desktop!

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.

Saved Messages title is not used when removing or adding a chat from/to a folder

3 participants