kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Include media attachments when redrafting on Mastodon
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>remove-makegetotheraccounts
rodzic
a63aa16472
commit
71ea3ed425
|
@ -101,13 +101,14 @@ export function redraft(status, raw_text) {
|
|||
return (dispatch, getState) => {
|
||||
const state = getState();
|
||||
const instance = state.get('instance');
|
||||
const { explicitAddressing } = getFeatures(instance);
|
||||
const { explicitAddressing, redraftMedia } = getFeatures(instance);
|
||||
|
||||
dispatch({
|
||||
type: REDRAFT,
|
||||
status,
|
||||
raw_text,
|
||||
explicitAddressing,
|
||||
redraftMedia,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
@ -432,7 +432,7 @@ export default function compose(state = initialState, action) {
|
|||
map.set('in_reply_to', action.status.get('in_reply_to_id'));
|
||||
map.set('privacy', action.status.get('visibility'));
|
||||
// TODO: Actually fix this rather than just removing it
|
||||
// map.set('media_attachments', action.status.get('media_attachments'));
|
||||
if (action.redraftMedia) map.set('media_attachments', action.status.get('media_attachments'));
|
||||
map.set('focusDate', new Date());
|
||||
map.set('caretPosition', null);
|
||||
map.set('idempotencyKey', uuid());
|
||||
|
|
|
@ -110,6 +110,7 @@ export const getFeatures = createSelector([instance => instance], instance => {
|
|||
v.software === MASTODON && gte(v.compatVersion, '3.2.0'),
|
||||
v.software === PLEROMA && gte(v.version, '2.4.50'),
|
||||
]),
|
||||
redraftMedia: v.software === MASTODON,
|
||||
}, overrides);
|
||||
});
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue