fix "new game" button with rating range

pull/7349/head
Thibault Duplessis 2020-09-22 11:25:12 +02:00
parent f017c6dec6
commit 299a2d1232
2 changed files with 3 additions and 1 deletions

View File

@ -63,8 +63,9 @@ export default function LichessLobby(opts: LobbyOpts) {
lichess.StrongSocket.firstConnect.then(() => {
const gameId = getParameterByName('hook_like');
if (!gameId) return;
const ratingRange = lobby.setup.stores.hook.get()?.ratingRange;
xhr.text(
`/setup/hook/${lichess.sri}/like/${gameId}?rr=${lobby.setup.ratingRange() || ''}`,
`/setup/hook/${lichess.sri}/like/${gameId}?rr=${ratingRange || ''}`,
{ method: 'post' });
lobby.setTab('real_time');
history.replaceState(null, '', '/');

View File

@ -203,6 +203,7 @@ export default class Setup {
rating + parseInt(form.ratingRange_range_min.value),
rating + parseInt(form.ratingRange_range_max.value)
].join('-');
save();
const poolMember = this.hookToPoolMember(color, form);
modal.close();
if (poolMember) {