facebook: handle sending failures facebook

Sun, 14 Jun 2015 21:32:05 -0400

author
James Geboski <jgeboski@gmail.com>
date
Sun, 14 Jun 2015 21:32:05 -0400
branch
facebook
changeset 37261
480d3184752c
parent 37260
473934b0c408
child 37262
510e0ad7dfea

facebook: handle sending failures

libpurple/protocols/facebook/api.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/facebook/api.c	Sun Jun 14 20:14:42 2015 -0400
+++ b/libpurple/protocols/facebook/api.c	Sun Jun 14 21:32:05 2015 -0400
@@ -337,6 +337,12 @@
 		return FALSE;
 	}
 
+	if (fb_json_node_chk_str(root, "$.failedSend.errorMessage", &msg)) {
+		fb_api_error(api, FB_API_ERROR_GENERAL, "%s", msg);
+		json_node_free(root);
+		return FALSE;
+	}
+
 	if (node != NULL) {
 		*node = root;
 	}

mercurial