wip
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
5b8ad04f8b
commit
9b0c05f70c
1 changed files with 4 additions and 4 deletions
|
@ -221,12 +221,12 @@ def note(%ActivityDraft{} = draft) do
|
|||
if draft.content_html_map do
|
||||
case Map.keys(draft.content_html_map) do
|
||||
["und"] ->
|
||||
%{"content" => MultiLanguage.map_to_str(draft.content_html_map, multiline: true)}
|
||||
%{"content" => Map.get(draft.content_html_map, "und")}
|
||||
|
||||
_ ->
|
||||
%{
|
||||
"contentMap" => draft.content_html_map,
|
||||
"content" => MultiLanguage.map_to_str(draft.content_html_map, multiline: true)
|
||||
"content" => Map.get(draft.content_html_map, draft.language)
|
||||
}
|
||||
end
|
||||
else
|
||||
|
@ -237,12 +237,12 @@ def note(%ActivityDraft{} = draft) do
|
|||
if draft.summary_map do
|
||||
case Map.keys(draft.summary_map) do
|
||||
["und"] ->
|
||||
%{"summary" => MultiLanguage.map_to_str(draft.summary_map, multiline: false)}
|
||||
%{"summary" => Map.get(draft.summary_map, "und")}
|
||||
|
||||
_ ->
|
||||
%{
|
||||
"summaryMap" => draft.summary_map,
|
||||
"summary" => MultiLanguage.map_to_str(draft.summary_map, multiline: false)
|
||||
"summary" => Map.get(draft.summary_map, draft.language)
|
||||
}
|
||||
end
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue