]> cat aescling's git repositories - mastodon.git/commitdiff
Fix replying to some remote toots switching to local-only
authorThibaut Girka <thib@sitedethib.com>
Sat, 29 Aug 2020 15:48:01 +0000 (17:48 +0200)
committerThibG <thib@sitedethib.com>
Sat, 29 Aug 2020 17:57:32 +0000 (19:57 +0200)
app/javascript/flavours/glitch/reducers/compose.js

index daf857541d5824a81437304c0fd6933636948825..478883f91fd0dbf567f68f2167983e9e44dd7dcc 100644 (file)
@@ -184,7 +184,7 @@ function continueThread (state, status) {
     map.set('in_reply_to', status.id);
     map.update(
       'advanced_options',
-      map => map.merge(new ImmutableMap({ do_not_federate: /👁\ufe0f?\u200b?(?:<\/p>)?$/.test(status.content) }))
+      map => map.merge(new ImmutableMap({ do_not_federate: status.get('local_only') }))
     );
     map.set('privacy', status.visibility);
     map.set('sensitive', false);
@@ -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: /👁\ufe0f?\u200b?(?:<\/p>)?$/.test(action.status.get('content')) }))
+        map => map.merge(new ImmutableMap({ do_not_federate: action.status.get('local_only') }))
       );
       map.set('focusDate', new Date());
       map.set('caretPosition', null);