Skip to content

FEAT(client): Add separate notification types for image messages#7159

Open
28arnab wants to merge 1 commit intomumble-voip:masterfrom
28arnab:issue-6970
Open

FEAT(client): Add separate notification types for image messages#7159
28arnab wants to merge 1 commit intomumble-voip:masterfrom
28arnab:issue-6970

Conversation

@28arnab
Copy link
Copy Markdown
Contributor

@28arnab 28arnab commented Apr 11, 2026

The client currently treats messages containing embedded images as regular text messages for logging and notification purposes. That makes it impossible to disable notifications for image posts without also disabling notifications for normal text messages.

This commit keeps image delivery on the existing TextMessage protocol path but classifies incoming messages with embedded content as image messages in the client. It also adds dedicated log/settings entries for image messages and private image messages so their notifications can be configured independently.

Implements #6970

Checks

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 11, 2026

Walkthrough

This pull request introduces two new message types—ImageMessage and PrivateImageMessage—to the logging system. These types are added to the Log::MsgType enum and integrated throughout the codebase with corresponding string conversions, localization entries, and sound settings. The MainWindow::msgTextMessage handler now detects whether incoming text messages contain image embeds by checking for the "<img" substring and logs them using the new message types accordingly. System tray notifications for these messages are configured to display without an icon.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description provides clear context for the change, explains the problem it solves, describes the implementation approach, and references the related issue. The required checklist item is marked as completed.
Title check ✅ Passed The title clearly summarizes the main change: adding separate notification types for image messages, which directly reflects the introduction of ImageMessage and PrivateImageMessage log types across all modified files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/mumble/Messages.cpp`:
- Around line 1040-1046: The current substring check in Messages.cpp
(messageContent/hasImage/msgType selection) is too loose and case-sensitive;
include QRegularExpression and replace the contains(QLatin1String("<img")) check
with a case-insensitive regex match for an actual <img tag boundary (e.g.
pattern "<img\\b") using QRegularExpression::CaseInsensitiveOption so tags like
"<IMG>" match but tokens like "<imgur>" do not, then compute hasImage from that
regex match and keep the existing msgType selection logic (use privateMessage,
Log::PrivateImageMessage, Log::ImageMessage, etc.).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 71342437-65a2-48d7-8766-5f90cd12c5b4

📥 Commits

Reviewing files that changed from the base of the PR and between 22f331f and addccfa.

📒 Files selected for processing (5)
  • src/mumble/EnumStringConversions.cpp
  • src/mumble/Log.cpp
  • src/mumble/Log.h
  • src/mumble/Messages.cpp
  • src/mumble/Settings.cpp

Comment thread src/mumble/Messages.cpp Outdated
@28arnab 28arnab changed the title FIX(client): Add separate notification types for image messages FEAT(client): Add separate notification types for image messages Apr 11, 2026
@28arnab
Copy link
Copy Markdown
Contributor Author

28arnab commented Apr 19, 2026

@Hartmnt can you check ? my last pr for this issue got removed by me because i followed ai to fix a git issue.

Copy link
Copy Markdown
Member

@Hartmnt Hartmnt left a comment

Choose a reason for hiding this comment

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

You can start by squashing the two relevant commits and then dropping the merge commit. Then rebase against the current master branch. We want to have PRs without merge commits. (force push is the correct way to update this PR)

I have not tested if this works, yet. But this PR will most likely not make the cut for 1.6 anyway.

Comment thread src/mumble/Log.cpp
Comment thread src/mumble/Log.cpp Outdated
Comment thread src/mumble/Messages.cpp Outdated
Comment thread src/mumble/Messages.cpp Outdated
@Hartmnt Hartmnt added this to the 1.7.0 milestone Apr 29, 2026
@Hartmnt Hartmnt added client feature-request This issue or PR deals with a new feature labels Apr 29, 2026
@Hartmnt Hartmnt linked an issue Apr 29, 2026 that may be closed by this pull request
Signed-off-by: 28arnab <68094959+28arnab@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client feature-request This issue or PR deals with a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add separate notification setting for image messages

2 participants