mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Prevent edits of unsent messages
This commit is contained in:
parent
2a5e20dc6f
commit
0db4d71ec2
2 changed files with 6 additions and 0 deletions
|
@ -1536,6 +1536,9 @@ TimelineModel::formatMemberEvent(QString id)
|
|||
void
|
||||
TimelineModel::setEdit(QString newEdit)
|
||||
{
|
||||
if (edit_.startsWith('m'))
|
||||
return;
|
||||
|
||||
if (edit_ != newEdit) {
|
||||
auto ev = events.get(newEdit.toStdString(), "");
|
||||
if (ev && mtx::accessors::sender(*ev) == http::client()->user_id().to_string()) {
|
||||
|
|
|
@ -260,6 +260,9 @@ public slots:
|
|||
QString reply() const { return reply_; }
|
||||
void setReply(QString newReply)
|
||||
{
|
||||
if (edit_.startsWith('m'))
|
||||
return;
|
||||
|
||||
if (reply_ != newReply) {
|
||||
reply_ = newReply;
|
||||
emit replyChanged(reply_);
|
||||
|
|
Loading…
Reference in a new issue