# HG changeset patch # User Scoopta # Date 1607038560 28800 # Thu Dec 03 15:36:00 2020 -0800 # Node ID 54d3b33dedde93ee997743cf1d70330b953fe5b1 # Parent 4e0650ec6b0f8b933552f658deeb0d7a68c7056c The message id is now put in notif_data[0] diff --git a/src/notify.c b/src/notify.c --- a/src/notify.c +++ b/src/notify.c @@ -22,6 +22,7 @@ #include #include #include +#include #include @@ -55,13 +56,16 @@ if(notif_data[2] != NULL) { free(notif_data[2]); } - notif_data[0] = strdup(app_name); - notif_data[1] = strdup(summary); - notif_data[2] = strdup(body); + char id_str[11]; + snprintf(id_str, 11, "%" PRIu32, ++id); + notif_data[0] = id_str; + notif_data[1] = strdup(app_name); + notif_data[2] = strdup(summary); + notif_data[3] = strdup(body); if(callback != NULL) { callback(app_name, summary, body); } - GVariant* ret = g_variant_new("(u)", ++id); + GVariant* ret = g_variant_new("(u)", id); g_dbus_method_invocation_return_value(invocation, ret); } else if(strcmp(method_name, "GetCapabilities") == 0) { GVariantBuilder* builder = g_variant_builder_new(G_VARIANT_TYPE("as"));