Ignore price for admins of live story.

This commit is contained in:
John Preston
2025-11-03 15:42:42 +04:00
parent b72deb1a0e
commit 81fc652dc1
8 changed files with 36 additions and 19 deletions

View File

@@ -1364,7 +1364,7 @@ void GroupCall::initialJoinRequested() {
}
}, _lifetime);
if (_sharedCall) {
if (_sharedCall && conference()) {
_canManage = _sharedCall->canManage();
return;
}

View File

@@ -49,9 +49,7 @@ class Call;
class EncryptDecrypt;
} // namespace TdE2E
namespace Calls {
namespace Group {
namespace Calls::Group {
struct MuteRequest;
struct VolumeRequest;
struct ParticipantState;
@@ -62,7 +60,9 @@ struct RtmpInfo;
enum class VideoQuality;
enum class Error;
class Messages;
} // namespace Group
} // namespace Calls::Group
namespace Calls {
struct InviteRequest;
struct InviteResult;

View File

@@ -137,7 +137,9 @@ bool Messages::ready() const {
}
void Messages::send(TextWithTags text, int stars) {
if (!ready()) {
if (text.empty() && !stars) {
return;
} else if (!ready()) {
_pending.push_back({ std::move(text), stars });
return;
}

View File

@@ -75,6 +75,7 @@ void SaveCallJoinMuted(
const auto call = peer->groupCall();
if (!call
|| call->id() != callId
|| peer->isUser()
|| !peer->canManageGroupCall()
|| !call->canChangeJoinMuted()
|| call->joinMuted() == joinMuted) {
@@ -99,7 +100,7 @@ void SaveCallMessagesEnabled(
if (!call
|| call->id() != callId
|| !peer->canManageGroupCall()
|| !call->canChangeJoinMuted()
|| !call->canChangeMessagesEnabled()
|| call->messagesEnabled() == messagesEnabled) {
return;
}
@@ -890,7 +891,7 @@ std::pair<Fn<void()>, rpl::lifetime> ShareInviteLinkAction(
bool generatingLink = false;
};
const auto state = lifetime.make_state<State>(&peer->session());
if (!peer->canManageGroupCall()) {
if (peer->isUser() || !peer->canManageGroupCall()) {
state->linkSpeaker = QString();
}