Commit a7906641 authored by Gabriel Ivașcu's avatar Gabriel Ivașcu

sync: WebChannels now have messageId as a string

This commit [0] to the FxA content server introduced an unique
suffix to the timestamp of messageId to ensure uniqueness, which
in turn caused messageId to be represented as a string and no
longer as an integer.

Also, I see fx_desktop_v3 is available so why not use it.

parent 4beb7d13
......@@ -57,7 +57,7 @@
#define FXA_IFRAME_URL ""
#define FXA_IFRAME_URL ""
enum {
......@@ -330,7 +330,7 @@ static void
sync_send_message_to_content (PrefsDialog *dialog,
const char *channel_id,
const char *command,
gint64 message_id,
const char *message_id,
JsonObject *data)
JsonNode *node;
......@@ -342,7 +342,7 @@ sync_send_message_to_content (PrefsDialog *dialog,
message = json_object_new ();
json_object_set_string_member (message, "command", command);
json_object_set_int_member (message, "messageId", message_id);
json_object_set_string_member (message, "messageId", message_id);
json_object_set_object_member (message, "data", json_object_ref (data));
detail = json_object_new ();
json_object_set_string_member (detail, "id", channel_id);
......@@ -406,7 +406,7 @@ server_message_received_cb (WebKitUserContentManager *manager,
sync_send_message_to_content (dialog,
json_object_get_string_member (detail, "id"),
json_object_get_int_member (message, "messageId"),
json_object_get_string_member (message, "messageId"),
json_object_unref (data);
} else if (g_strcmp0 (command, "fxaccounts:login") == 0) {
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