Skip to content

Feature Request: Allow dynamic Notification Grouping via message 'extras' (Topic-based grouping) #427

@blarg3891

Description

@blarg3891

Is your feature request related to a problem? Please describe.
Currently, all notifications from Gotify are bundled into a single "Gotify" group in the Android notification shade, regardless of which "Application" (Token) sent them.

While issue #187 mentions that native notification grouping is supported, it appears to rely on Android's default behavior, which merges all messages from the app into a single list.

As shown in the screenshot below, I have "Dryer" alerts and "TrueNAS" alerts. Even though they come from separate Applications (different tokens, different priorities, different sounds), they are flat-listed under one main "Gotify" group. There is no way to distinguish or dismiss just the "Dryer" group without expanding the entire list.

Image

Describe the solution you'd like
I would like to support Topic/Channel-based Grouping by passing a group ID via the message extras.

If the Android client sees a group key in the payload, it should use that string as the setGroup() key when building the notification.

Proposed Payload:

{
  "message": "Cycle Complete",
  "title": "Dryer",
  "priority": 5,
  "extras": {
    "client::notification": {
      "group": "laundry"
    }
  }
}

Proposed Logic:

Check extras for client::notification::group.

If present, use that value for notificationBuilder.setGroup("laundry").

If absent, fallback to current behavior (default app grouping).

Additional Context This logic is similar to how the Home Assistant companion app allows users to specify a group tag to keep "Security" alerts separate from "Laundry" alerts in the notification shade. This would make Gotify significantly more powerful for users monitoring multiple distinct systems without relying on the default app-wide bundle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions