Fix #80: Include all mentions in draft replies.

This commit is contained in:
Nicolas Perriault 2017-04-28 09:03:50 +02:00
parent 75aa841ceb
commit 5fbfe8e7cb
No known key found for this signature in database
GPG Key ID: DA5E4C83904F7A2A

View File

@ -366,16 +366,18 @@ updateDraft draftMsg draft =
UpdateReplyTo status -> UpdateReplyTo status ->
let let
mention = mentions =
"@" ++ status.account.acct status.mentions
|> List.map (\m -> "@" ++ m.acct)
|> String.join " "
prefix =
"@" ++ status.account.acct ++ " " ++ mentions
in in
{ draft { draft
| in_reply_to = Just status | in_reply_to = Just status
, status = , status =
if String.startsWith mention draft.status then prefix ++ " " ++ draft.status
draft.status
else
mention ++ " " ++ draft.status
, sensitive = Maybe.withDefault False status.sensitive , sensitive = Maybe.withDefault False status.sensitive
, spoiler_text = , spoiler_text =
if status.spoiler_text == "" then if status.spoiler_text == "" then