use camelCase
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
53152d9174
commit
ffbb6f51de
|
@ -98,7 +98,7 @@ export const ensureComposeIsVisible = (getState, routerHistory) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export function setComposeToStatus(status, raw_text, spoiler_text, content_type) {
|
export function setComposeToStatus(status, rawText, spoilerText, contentType) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
const { instance } = getState();
|
const { instance } = getState();
|
||||||
const { explicitAddressing } = getFeatures(instance);
|
const { explicitAddressing } = getFeatures(instance);
|
||||||
|
@ -106,10 +106,10 @@ export function setComposeToStatus(status, raw_text, spoiler_text, content_type)
|
||||||
dispatch({
|
dispatch({
|
||||||
type: COMPOSE_SET_STATUS,
|
type: COMPOSE_SET_STATUS,
|
||||||
status,
|
status,
|
||||||
raw_text,
|
rawText,
|
||||||
explicitAddressing,
|
explicitAddressing,
|
||||||
spoiler_text,
|
spoilerText,
|
||||||
content_type,
|
contentType,
|
||||||
v: parseVersion(instance.version),
|
v: parseVersion(instance.version),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -430,14 +430,14 @@ export default function compose(state = initialState, action) {
|
||||||
case COMPOSE_SET_STATUS:
|
case COMPOSE_SET_STATUS:
|
||||||
return state.withMutations(map => {
|
return state.withMutations(map => {
|
||||||
map.set('id', action.status.get('id'));
|
map.set('id', action.status.get('id'));
|
||||||
map.set('text', action.raw_text || unescapeHTML(expandMentions(action.status)));
|
map.set('text', action.rawText || unescapeHTML(expandMentions(action.status)));
|
||||||
map.set('to', action.explicitAddressing ? getExplicitMentions(action.status.get('account', 'id'), action.status) : ImmutableOrderedSet());
|
map.set('to', action.explicitAddressing ? getExplicitMentions(action.status.get('account', 'id'), action.status) : ImmutableOrderedSet());
|
||||||
map.set('in_reply_to', action.status.get('in_reply_to_id'));
|
map.set('in_reply_to', action.status.get('in_reply_to_id'));
|
||||||
map.set('privacy', action.status.get('visibility'));
|
map.set('privacy', action.status.get('visibility'));
|
||||||
map.set('focusDate', new Date());
|
map.set('focusDate', new Date());
|
||||||
map.set('caretPosition', null);
|
map.set('caretPosition', null);
|
||||||
map.set('idempotencyKey', uuid());
|
map.set('idempotencyKey', uuid());
|
||||||
map.set('content_type', action.content_type || 'text/plain');
|
map.set('content_type', action.contentType || 'text/plain');
|
||||||
|
|
||||||
if (action.v?.software === PLEROMA && hasIntegerMediaIds(action.status)) {
|
if (action.v?.software === PLEROMA && hasIntegerMediaIds(action.status)) {
|
||||||
map.set('media_attachments', ImmutableList());
|
map.set('media_attachments', ImmutableList());
|
||||||
|
|
Loading…
Reference in New Issue