diff options
author | Sadrul Habib Chowdhury <sadrul@pidgin.im> | 2007-09-04 21:00:24 +0000 |
---|---|---|
committer | Sadrul Habib Chowdhury <sadrul@pidgin.im> | 2007-09-04 21:00:24 +0000 |
commit | de18b2222bbeae9fdfb1b8fe28d638ac8aec2adc (patch) | |
tree | 15193f8a9e4552ad498445a3c448533e3f92f598 /libpurple/plugins/offlinemsg.c | |
parent | 132bf77cc975cad1b4040c861913ad3c7c72a98c (diff) | |
download | pidgin-de18b2222bbeae9fdfb1b8fe28d638ac8aec2adc.tar.gz |
Catch the event at the very end to make sure other plugins can play with it
before we do, if they want to.
Diffstat (limited to 'libpurple/plugins/offlinemsg.c')
-rw-r--r-- | libpurple/plugins/offlinemsg.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libpurple/plugins/offlinemsg.c b/libpurple/plugins/offlinemsg.c index cb9c9a1119..e586743848 100644 --- a/libpurple/plugins/offlinemsg.c +++ b/libpurple/plugins/offlinemsg.c @@ -113,6 +113,10 @@ sending_msg_cb(PurpleAccount *account, const char *who, char **message, gpointer PurpleConversation *conv; OfflineMessageSetting setting; + if (message == NULL || *message == NULL || + **message == '\0') + return; + buddy = purple_find_buddy(account, who); if (!buddy) return; @@ -167,8 +171,8 @@ sending_msg_cb(PurpleAccount *account, const char *who, char **message, gpointer static gboolean plugin_load(PurplePlugin *plugin) { - purple_signal_connect(purple_conversations_get_handle(), "sending-im-msg", - plugin, PURPLE_CALLBACK(sending_msg_cb), plugin); + purple_signal_connect_priority(purple_conversations_get_handle(), "sending-im-msg", + plugin, PURPLE_CALLBACK(sending_msg_cb), plugin, PURPLE_SIGNAL_PRIORITY_HIGHEST); return TRUE; } |