about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/reducers/compose.js
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2021-05-17 21:12:45 -0500
committerStarfall <us@starfall.systems>2021-05-17 21:12:45 -0500
commit2c6fcb9cf8fbb09e900fc3625837529155f98f4f (patch)
treeb78e5204ef455b25c06cde33e8a6846ac46fcdbf /app/javascript/flavours/glitch/reducers/compose.js
parent2523b046523f92ccf12756dce0204926433d1c7f (diff)
parent567745c1e66593ef46a86dc0bcfe824cefb04f14 (diff)
Merge branch 'glitch'
Diffstat (limited to 'app/javascript/flavours/glitch/reducers/compose.js')
-rw-r--r--app/javascript/flavours/glitch/reducers/compose.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js
index e081c31ad..e989401d8 100644
--- a/app/javascript/flavours/glitch/reducers/compose.js
+++ b/app/javascript/flavours/glitch/reducers/compose.js
@@ -383,7 +383,7 @@ export default function compose(state = initialState, action) {
       map.set('privacy', privacyPreference(action.status.get('visibility'), state.get('default_privacy')));
       map.update(
         'advanced_options',
-        map => map.merge(new ImmutableMap({ do_not_federate: action.status.get('local_only') }))
+        map => map.merge(new ImmutableMap({ do_not_federate: !!action.status.get('local_only') }))
       );
       map.set('focusDate', new Date());
       map.set('caretPosition', null);
@@ -501,7 +501,7 @@ export default function compose(state = initialState, action) {
   case COMPOSE_DOODLE_SET:
     return state.mergeIn(['doodle'], action.options);
   case REDRAFT:
-    const do_not_federate = action.status.get('local_only', false);
+    const do_not_federate = !!action.status.get('local_only');
     let text = action.raw_text || unescapeHTML(expandMentions(action.status));
     if (do_not_federate) text = text.replace(/ ?👁\ufe0f?\u200b?$/, '');
     return state.withMutations(map => {