equal
deleted
inserted
replaced
28 |
28 |
29 // xmpp_send_s10n(jid, subtype) |
29 // xmpp_send_s10n(jid, subtype) |
30 // Send a s10n message with the passed subtype |
30 // Send a s10n message with the passed subtype |
31 void xmpp_send_s10n(const char *bjid, LmMessageSubType type) |
31 void xmpp_send_s10n(const char *bjid, LmMessageSubType type) |
32 { |
32 { |
|
33 if (G_UNLIKELY(!bjid || !*bjid)) { |
|
34 scr_LogPrint(LPRINT_LOGNORM, "Empty JID."); |
|
35 return; |
|
36 } |
33 LmMessage *x = lm_message_new_with_sub_type(bjid, |
37 LmMessage *x = lm_message_new_with_sub_type(bjid, |
34 LM_MESSAGE_TYPE_PRESENCE, |
38 LM_MESSAGE_TYPE_PRESENCE, |
35 type); |
39 type); |
36 lm_connection_send(lconnection, x, NULL); |
40 lm_connection_send(lconnection, x, NULL); |
37 lm_message_unref(x); |
41 lm_message_unref(x); |