Set scheduled post date to 10 minutes after current time

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
takahe^2^2
marcin mikołajczak 2023-01-01 23:50:55 +01:00
rodzic c7e140bf3f
commit 0001ea47df
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -455,7 +455,7 @@ export default function compose(state = initialState, action: AnyAction) {
case COMPOSE_POLL_REMOVE: case COMPOSE_POLL_REMOVE:
return updateCompose(state, action.id, compose => compose.set('poll', null)); return updateCompose(state, action.id, compose => compose.set('poll', null));
case COMPOSE_SCHEDULE_ADD: case COMPOSE_SCHEDULE_ADD:
return updateCompose(state, action.id, compose => compose.set('schedule', new Date())); return updateCompose(state, action.id, compose => compose.set('schedule', new Date(Date.now() + 10 * 60 * 1000)));
case COMPOSE_SCHEDULE_SET: case COMPOSE_SCHEDULE_SET:
return updateCompose(state, action.id, compose => compose.set('schedule', action.date)); return updateCompose(state, action.id, compose => compose.set('schedule', action.date));
case COMPOSE_SCHEDULE_REMOVE: case COMPOSE_SCHEDULE_REMOVE: