Skip to content

Commit

Permalink
Keep an empty link for an empty invoice_slug.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Nov 15, 2024
1 parent 774c421 commit 77aa507
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions td/telegram/UpdatesManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3110,12 +3110,16 @@ void UpdatesManager::process_qts_update(tl_object_ptr<telegram_api::Update> &&up
LOG(ERROR) << "Receive invalid " << to_string(update);
break;
}
auto r_link = LinkManager::get_internal_link(
td_api::make_object<td_api::internalLinkTypeInvoice>(update->invoice_slug_), false);
string link;
if (!update->invoice_slug_.empty()) {
link = LinkManager::get_internal_link(
td_api::make_object<td_api::internalLinkTypeInvoice>(update->invoice_slug_), false)
.move_as_ok();
}
send_closure(G()->td(), &Td::send_update,
td_api::make_object<td_api::updateStarSubscriptionExpired>(
td_->user_manager_->get_user_id_object(user_id, "updateStarSubscriptionExpired"),
update->payload_, r_link.is_ok() ? r_link.ok() : string(), update->until_date_));
update->payload_, link, update->until_date_));
break;
}
case telegram_api::updateBotBusinessConnect::ID: {
Expand Down

0 comments on commit 77aa507

Please sign in to comment.