[epiphany] sync: WebChannels now have messageId as a string



commit a79066414e6d93123ff4b1425c90f6d753ed0288
Author: Gabriel Ivascu <ivascu gabriel59 gmail com>
Date:   Fri Jun 9 21:27:48 2017 +0300

    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.
    
    [0] https://github.com/mozilla/fxa-content-server/commit/d4c0343c7494c6ee64470d8e01b8941c70d28d74

 src/prefs-dialog.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 1d5e635..9c9efc0 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -57,7 +57,7 @@
 #endif
 
 #define DOWNLOAD_BUTTON_WIDTH   8
-#define FXA_IFRAME_URL "https://accounts.firefox.com/signin?service=sync&context=fx_desktop_v2";
+#define FXA_IFRAME_URL "https://accounts.firefox.com/signin?service=sync&context=fx_desktop_v3";
 
 enum {
   COL_LANG_NAME,
@@ -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"),
                                   "fxaccounts:can_link_account",
-                                  json_object_get_int_member (message, "messageId"),
+                                  json_object_get_string_member (message, "messageId"),
                                   data);
     json_object_unref (data);
   } else if (g_strcmp0 (command, "fxaccounts:login") == 0) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]