moveCall static method

void moveCall(
  1. ChatId chatId,
  2. ChatId newChatId, {
  3. WebStoredCall? newState,
})

Moves a call identified by its chatId to the newChatId replacing its stored state with an optional newState.

Implementation

static void moveCall(
  ChatId chatId,
  ChatId newChatId, {
  WebStoredCall? newState,
}) {
  newState ??= getCall(chatId);
  removeCall(chatId);
  setCall(newState!);
  replaceState(chatId.val, newChatId.val);
}