#define EMPATHY_NOTIFY_MANAGER_CAP_BODY_HYPERLINKS "body-hyperlinks"
#define EMPATHY_NOTIFY_MANAGER_CAP_BODY_IMAGES "body-images"
#define EMPATHY_NOTIFY_MANAGER_CAP_BODY_MARKUP "body-markup"
+#define EMPATHY_NOTIFY_MANAGER_CAP_CATEGORY "category"
#define EMPATHY_NOTIFY_MANAGER_CAP_ICON_MULTI "icon-multi"
#define EMPATHY_NOTIFY_MANAGER_CAP_ICON_STATIC "icon-static"
#define EMPATHY_NOTIFY_MANAGER_CAP_IMAGE_SVG_XML "image/svg+xml"
return FALSE;
}
+static const gchar *
+get_category_for_event_type (EmpathyEventType type)
+{
+ switch (type) {
+ case EMPATHY_EVENT_TYPE_CHAT:
+ return "im.received";
+ case EMPATHY_EVENT_TYPE_VOIP:
+ case EMPATHY_EVENT_TYPE_TRANSFER:
+ case EMPATHY_EVENT_TYPE_INVITATION:
+ case EMPATHY_EVENT_TYPE_AUTH:
+ case EMPATHY_EVENT_TYPE_SUBSCRIPTION:
+ case EMPATHY_EVENT_TYPE_PRESENCE:
+ return NULL;
+ }
+
+ return NULL;
+}
+
static void
update_notification (EmpathyNotificationsApprover *self)
{
}
else
{
+ const gchar *category;
+
/* if the notification server supports x-canonical-append,
* the hint will be added, so that the message from the
* just created notification will be automatically appended
if (notification_is_urgent (self, notification))
notify_notification_set_urgency (notification, NOTIFY_URGENCY_CRITICAL);
+
+ category = get_category_for_event_type (self->priv->event->type);
+ if (category != NULL)
+ notify_notification_set_hint_string (notification,
+ EMPATHY_NOTIFY_MANAGER_CAP_CATEGORY, category);
}
pixbuf = empathy_notify_manager_get_pixbuf_for_notification (