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 ->
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