[feature] Send local_only instead of eyeball (#13)
Co-authored-by: Ember <me@ember-is.gay> Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/13 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
This commit is contained in:
@@ -179,10 +179,6 @@ export function submitCompose(routerHistory) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getState().getIn(['compose', 'advanced_options', 'do_not_federate'])) {
|
|
||||||
status = status + ' 👁️';
|
|
||||||
}
|
|
||||||
|
|
||||||
dispatch(submitComposeRequest());
|
dispatch(submitComposeRequest());
|
||||||
|
|
||||||
// If we're editing a post with media attachments, those have not
|
// If we're editing a post with media attachments, those have not
|
||||||
@@ -219,6 +215,7 @@ export function submitCompose(routerHistory) {
|
|||||||
visibility: getState().getIn(['compose', 'privacy']),
|
visibility: getState().getIn(['compose', 'privacy']),
|
||||||
poll: getState().getIn(['compose', 'poll'], null),
|
poll: getState().getIn(['compose', 'poll'], null),
|
||||||
language: getState().getIn(['compose', 'language']),
|
language: getState().getIn(['compose', 'language']),
|
||||||
|
local_only: getState().getIn(['compose', 'advanced_options', 'do_not_federate']),
|
||||||
},
|
},
|
||||||
headers: {
|
headers: {
|
||||||
'Idempotency-Key': getState().getIn(['compose', 'idempotencyKey']),
|
'Idempotency-Key': getState().getIn(['compose', 'idempotencyKey']),
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ class ComposeForm extends ImmutablePureComponent {
|
|||||||
return [
|
return [
|
||||||
this.props.spoiler? this.props.spoilerText: '',
|
this.props.spoiler? this.props.spoilerText: '',
|
||||||
countableText(this.props.text),
|
countableText(this.props.text),
|
||||||
this.props.advancedOptions && this.props.advancedOptions.get('do_not_federate') ? ' 👁️' : '',
|
|
||||||
].join('');
|
].join('');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -570,7 +570,6 @@ export default function compose(state = initialState, action) {
|
|||||||
case REDRAFT:
|
case REDRAFT:
|
||||||
const do_not_federate = !!action.status.get('local_only');
|
const do_not_federate = !!action.status.get('local_only');
|
||||||
let text = action.raw_text || unescapeHTML(expandMentions(action.status));
|
let text = action.raw_text || unescapeHTML(expandMentions(action.status));
|
||||||
if (do_not_federate) text = text.replace(/ ?👁\ufe0f?\u200b?$/, '');
|
|
||||||
return state.withMutations(map => {
|
return state.withMutations(map => {
|
||||||
map.set('text', text);
|
map.set('text', text);
|
||||||
map.set('content_type', action.content_type || 'text/plain');
|
map.set('content_type', action.content_type || 'text/plain');
|
||||||
|
|||||||
Reference in New Issue
Block a user