void request_show_sync_notification()
{
JsonObject *j_object = NULL;
+
+ if (!priv_data.socket) {
+ job_progress = TRUE;
+ StickerRequest pending_request;
+ pending_request.req_type = REQUEST_TYPE_SHOW_NOTIFICATION;
+ ReqQueue.push(pending_request);
+ LOGI("Push show notification request");
+ return;
+ }
+
j_object = json_object_new();
if (j_object == NULL) {
LOGE("json object create error");
if (_send_json_data(j_object) == FALSE) {
LOGE("Failed to send STICKER_REQUEST_NOTI_REQ");
+ } else {
+ job_progress = TRUE;
}
json_object_unref(j_object);
if (request_sticker_data(request.mode.c_str(), request.category.c_str(), request.type.c_str()))
ReqQueue.pop();
}
+ else if (request.req_type == REQUEST_TYPE_SHOW_NOTIFICATION) {
+ LOGD("[Request to show notification]");
+ request_show_sync_notification();
+ ReqQueue.pop();
+ }
return true;
}