Commit 8f681473 authored by Kyle Evans's avatar Kyle Evans
Browse files

Send data to MMSD



This sends a system message indicating the WAP Push type and forwards the
data to MMSD. The SMS will be deleted on the 'PushNotify' callback.
Signed-off-by: Kyle Evans's avatarKyle Evans <kvans32@gmail.com>
parent 3d93a87a
Pipeline #60666 passed with stages
in 5 minutes and 4 seconds
......@@ -523,20 +523,33 @@ pur_mm_send_sms_to_purple_serv (PurSmsProps *sms_props)
if (pur_mm_get_modem_state ()) {
pc = purple_account_get_connection (mm_sms->account);
if (sms_props->message &&
sms_props->number &&
(sms_props->message[0] != '\0') &&
if (sms_props->number &&
(sms_props->number [0] != '\0')) {
serv_got_im (pc,
sms_props->number,
sms_props->message,
PURPLE_MESSAGE_RECV,
time (NULL));
if (mm_sms->sms_delete_received) {
pur_mm_delete_sms (sms_props);
}
if (sms_props->message) {
serv_got_im (pc,
sms_props->number,
sms_props->message,
PURPLE_MESSAGE_RECV,
time (NULL));
if (mm_sms->sms_delete_received) {
pur_mm_delete_sms (sms_props);
}
} else
if (sms_props->data) {
/* hack, print a system message indicating the push type.
* Maybe if this works everywhere, make it optional */
gchar *push_type = (gchar *)&sms_props->data[5];
serv_got_im (pc,
sms_props->number,
push_type,
PURPLE_MESSAGE_SYSTEM,
time (NULL));
g_debug ("send push to mmsd");
pur_mmsd_push_notify (sms_props);
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment