Permalink
Browse files

Add support for passing authorization-requested events to libnotify

  • Loading branch information...
xavery authored and sardemff7 committed Aug 25, 2017
1 parent e06dd88 commit 72f61c18e289d338135cd6b21e0106dd4283b65a
Showing with 16 additions and 0 deletions.
  1. +16 −0 src/purple-libnotify+.c
View
@@ -168,6 +168,12 @@ _purple_notify_plus_email(PurplePlugin *plugin, const gchar *subject, const gcha
g_free(title);
}
static void
_purple_notify_auth_request(PurpleAccount *account, const char *sender, const char *message, PurplePlugin *plugin)
{
notify_plus_send_name_notification(sender, _("%s requested authorization"), message, NULL, NULL);
}
static void
notify_plus_adapt_to_server_capabilities()
{
@@ -268,6 +274,11 @@ plugin_load(PurplePlugin *plugin)
(PurpleCallback)_purple_notify_plus_email, plugin
);
purple_signal_connect(
handle, "user_authorization-requested", plugin,
(PurpleCallback)_purple_notify_auth_request, plugin
);
return TRUE;
}
@@ -330,6 +341,11 @@ plugin_unload(PurplePlugin *plugin)
(PurpleCallback)_purple_notify_plus_email
);
purple_signal_disconnect(
handle, "user_authorization-requested", plugin,
(PurpleCallback)_purple_notify_auth_request
);
notify_uninit();
return TRUE;

0 comments on commit 72f61c1

Please sign in to comment.