Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/handlers/commands/start.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@
if (payload.starts_with("invite_")) {
const std::string_view hash = payload.substr("invite_"sv.size());
auto storage = api.getStoragesApi().activate(userId, api::InvitationId{hash});
if (!storage)
return;
renderMainMenu(false, storage->name, userId, chatId, bot, api);
stateManager.put(MainMenu{});
return;
if (storage) {
renderMainMenu(false, storage->name, userId, chatId, bot, api);
} else {
std::optional<std::optional<std::string>> resp = std::optional<std::string>(std::nullopt);

Check failure on line 53 in src/handlers/commands/start.cpp

View workflow job for this annotation

GitHub Actions / clang-tidy-check

variable 'resp' of type 'std::optional<std::optional<std::string>>' (aka 'optional<optional<basic_string<char>>>') can be declared 'const' [misc-const-correctness,-warnings-as-errors]
renderMainMenu(false, resp, userId, chatId, bot, api);
}
}

if (payload.starts_with("recipe_")) {
Expand Down
Loading