From 28c829c2c8de0d0f79c885b37c128fccd155cbb4 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Thu, 24 Jan 2019 21:14:02 -0800 Subject: [PATCH] Attempt to fix image "double sending" issue. --- src/Main.elm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Main.elm b/src/Main.elm index 418b705..a19a184 100644 --- a/src/Main.elm +++ b/src/Main.elm @@ -114,7 +114,7 @@ updateFileUploadComplete : Model -> RoomId -> String -> (Result Http.Error Strin updateFileUploadComplete m rid mime ur = let command = case ur of - Ok u -> sendFileMessage m.apiUrl (Maybe.withDefault "" m.token) m.transactionId rid mime u + Ok u -> sendFileMessage m.apiUrl (Maybe.withDefault "" m.token) (m.transactionId + 1) rid mime u _ -> Cmd.none newErrors = case ur of Err e -> [ "Error uploading file. Please check your internet connection and try again." ] @@ -126,7 +126,7 @@ updateImageUploadComplete : Model -> RoomId -> String -> (Result Http.Error Stri updateImageUploadComplete m rid mime ur = let command = case ur of - Ok u -> sendImageMessage m.apiUrl (Maybe.withDefault "" m.token) m.transactionId rid mime u + Ok u -> sendImageMessage m.apiUrl (Maybe.withDefault "" m.token) (m.transactionId + 1) rid mime u _ -> Cmd.none newErrors = case ur of Err e -> [ "Error uploading image. Please check your internet connection and try again." ]