[Glitch] Change language to be carried over on reply

Port c5eabffe34 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
lolsob-rspec
Claire 2022-05-31 05:53:43 +02:00
parent 705ebf794b
commit c3842a700f
1 changed files with 4 additions and 0 deletions

View File

@ -419,6 +419,10 @@ export default function compose(state = initialState, action) {
map.set('preselectDate', new Date()); map.set('preselectDate', new Date());
map.set('idempotencyKey', uuid()); map.set('idempotencyKey', uuid());
if (action.status.get('language')) {
map.set('language', action.status.get('language'));
}
if (action.status.get('spoiler_text').length > 0) { if (action.status.get('spoiler_text').length > 0) {
let spoiler_text = action.status.get('spoiler_text'); let spoiler_text = action.status.get('spoiler_text');
if (action.prependCWRe && !spoiler_text.match(/^re[: ]/i)) { if (action.prependCWRe && !spoiler_text.match(/^re[: ]/i)) {