disable send Msg to own id in chat rooms

This commit is contained in:
csoler 2019-01-11 23:17:09 +01:00
parent e92c43f1f7
commit fdf6a32236
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C

View File

@ -277,7 +277,7 @@ void ChatLobbyDialog::initParticipantsContextMenu(QMenu *contextMnu, QList<RsGxs
contextMnu->addAction(showInPeopleAct);
distantChatAct->setEnabled(false);
sendMessageAct->setEnabled(true);
sendMessageAct->setEnabled(false);
muteAct->setEnabled(false);
muteAct->setCheckable(true);
muteAct->setChecked(false);
@ -299,6 +299,7 @@ void ChatLobbyDialog::initParticipantsContextMenu(QMenu *contextMnu, QList<RsGxs
if(!gxsid.isNull() && !rsIdentity->isOwnId(gxsid))
{
distantChatAct->setEnabled(true);
sendMessageAct->setEnabled(true);
votePositiveAct->setEnabled(rsReputations->overallReputationLevel(gxsid) != RsReputations::REPUTATION_LOCALLY_POSITIVE);
voteNeutralAct->setEnabled((rsReputations->overallReputationLevel(gxsid) == RsReputations::REPUTATION_LOCALLY_POSITIVE) || (rsReputations->overallReputationLevel(gxsid) == RsReputations::REPUTATION_LOCALLY_NEGATIVE) );
voteNegativeAct->setEnabled(rsReputations->overallReputationLevel(gxsid) != RsReputations::REPUTATION_LOCALLY_NEGATIVE);