diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-11-12 14:33:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-12 14:33:14 +0100 |
commit | 81b1d32d5b618daa4003b8de8292ae4dd3e656f6 (patch) | |
tree | 5cdf443e718788f8473148ce4d4205da54efbf04 /app/javascript/flavours/glitch/reducers | |
parent | d37f426f95f812b44925e13c00eabb9d1cd76b1f (diff) | |
parent | a808ac1fd8d4a42ee930bbb30cb6b58c810f828b (diff) |
Merge pull request #1920 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/reducers')
-rw-r--r-- | app/javascript/flavours/glitch/reducers/compose.js | 4 |
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 460af3955..18e437bbc 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -222,7 +222,7 @@ function appendMedia(state, media, file) { if (media.get('type') === 'image') { media = media.set('file', file); } - map.update('media_attachments', list => list.push(media)); + map.update('media_attachments', list => list.push(media.set('unattached', true))); map.set('is_uploading', false); map.set('is_processing', false); map.set('resetFileKey', Math.floor((Math.random() * 0x10000))); @@ -563,7 +563,7 @@ export default function compose(state = initialState, action) { map.set('content_type', action.content_type || 'text/plain'); map.set('in_reply_to', action.status.get('in_reply_to_id')); map.set('privacy', action.status.get('visibility')); - map.set('media_attachments', action.status.get('media_attachments')); + map.set('media_attachments', action.status.get('media_attachments').map((media) => media.set('unattached', true))); map.set('focusDate', new Date()); map.set('caretPosition', null); map.set('idempotencyKey', uuid()); |