From 5fbfe8e7cb51096735ab3169bf55b6e8358fa855 Mon Sep 17 00:00:00 2001 From: Nicolas Perriault Date: Fri, 28 Apr 2017 09:03:50 +0200 Subject: [PATCH] Fix #80: Include all mentions in draft replies. --- src/Model.elm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Model.elm b/src/Model.elm index 135daca..18eaf1a 100644 --- a/src/Model.elm +++ b/src/Model.elm @@ -366,16 +366,18 @@ updateDraft draftMsg draft = UpdateReplyTo status -> let - mention = - "@" ++ status.account.acct + mentions = + status.mentions + |> List.map (\m -> "@" ++ m.acct) + |> String.join " " + + prefix = + "@" ++ status.account.acct ++ " " ++ mentions in { draft | in_reply_to = Just status , status = - if String.startsWith mention draft.status then - draft.status - else - mention ++ " " ++ draft.status + prefix ++ " " ++ draft.status , sensitive = Maybe.withDefault False status.sensitive , spoiler_text = if status.spoiler_text == "" then