libpurple/plugins/offlinemsg.c

changeset 19825
9f31b80db6a9
parent 16745
df2c3d6b609a
child 19832
84b69b21672b
equal deleted inserted replaced
19824:f99f468cda22 19825:9f31b80db6a9
111 PurpleBuddy *buddy; 111 PurpleBuddy *buddy;
112 OfflineMsg *offline; 112 OfflineMsg *offline;
113 PurpleConversation *conv; 113 PurpleConversation *conv;
114 OfflineMessageSetting setting; 114 OfflineMessageSetting setting;
115 115
116 if (message == NULL || *message == NULL ||
117 **message == '\0')
118 return;
119
116 buddy = purple_find_buddy(account, who); 120 buddy = purple_find_buddy(account, who);
117 if (!buddy) 121 if (!buddy)
118 return; 122 return;
119 123
120 if (purple_presence_is_online(purple_buddy_get_presence(buddy))) 124 if (purple_presence_is_online(purple_buddy_get_presence(buddy)))
165 } 169 }
166 170
167 static gboolean 171 static gboolean
168 plugin_load(PurplePlugin *plugin) 172 plugin_load(PurplePlugin *plugin)
169 { 173 {
170 purple_signal_connect(purple_conversations_get_handle(), "sending-im-msg", 174 purple_signal_connect_priority(purple_conversations_get_handle(), "sending-im-msg",
171 plugin, PURPLE_CALLBACK(sending_msg_cb), plugin); 175 plugin, PURPLE_CALLBACK(sending_msg_cb), plugin, PURPLE_SIGNAL_PRIORITY_HIGHEST);
172 return TRUE; 176 return TRUE;
173 } 177 }
174 178
175 static gboolean 179 static gboolean
176 plugin_unload(PurplePlugin *plugin) 180 plugin_unload(PurplePlugin *plugin)

mercurial