Messaging notifications

asked 2016-01-14 18:02:35 +0200

Andy Branson gravatar image

Does anyone know how the messaging notifications work? I'm trying to improve the notification filtering in the pebble connector, and I found there are three notifications published to D-Bus when a message is received by commhistoryd:

  1. A notification of category x-nemo.messaging.im.preview containing x-nemo-preview-body and x-nemo-preview-summary hints containing the message. This contains the message information, but the category is flagged as transient, so it should not appear on the Events screen. I assume this is just for displaying the bubble at the top of the screen, as it doesn't define an action.
  2. A nemo.messaging.im notification containing not much except for an action definition, a timestamp and what looks like a Base64 encoded something in a QByteArray, called 'x-commhistoryd-data'. This one has 'x-nemo-hidden' set to false. My guess is this is the notif I want, but I'll need to decode the QByteArray into something, but what?
  3. A x-nemo.messaging.group notification. This has the action again, an item count, and hidden set to true. I think this might be the notification telling you how many messages are unread.

I'd love to handle these properly if anyone knows what's going on here, or can point me to some documentation that can help.

edit retag flag offensive close delete