Added own id check before start to edit post

This commit is contained in:
defnax 2025-12-26 17:00:43 +01:00
parent 665bf5a1d9
commit 7273adc442

View file

@ -533,6 +533,13 @@ void PostedListWidgetWithModel::editPost()
RsGxsId author_id;
ui->idChooser->getChosenId(author_id);
if(!rsIdentity->isOwnId(author_id))
{
QString errorMessage = QString(tr("Attempt to edit a board post with an author that is not a own ID"));
QMessageBox::warning(this, "RetroShare", errorMessage, QMessageBox::Ok, QMessageBox::Ok);
return;
}
PostedCreatePostDialog *msgDialog = new PostedCreatePostDialog(rsPosted, groupId(),author_id, post.mMeta.mMsgId);
msgDialog->show();
}