Skip to content
This repository has been archived by the owner on Jun 27, 2021. It is now read-only.

Double click edit opens edit prompt regardless of message author #119

Open
Column01 opened this issue Apr 15, 2020 · 3 comments
Open

Double click edit opens edit prompt regardless of message author #119

Column01 opened this issue Apr 15, 2020 · 3 comments
Labels
category: plugins Related to a specific plugin, or new plugin request. priority: medium Somewhat important, but doesn't require immediate attention. status: planned Considered as a to-do; will be worked on in the near future type: bug Something isn't working type: enhancement New feature or request

Comments

@Column01
Copy link

Column01 commented Apr 15, 2020

The double click edit will allow you to "edit" messages that weren't posted by you. It will raise an error from discord in the developer console if you change the message contents and then click save.

I'm using the beta branch for ED which also has a different version of that plugin compared to the stable branch it appears.

Possible solution

  • Check if the message was authored by the client, and if it wasn't, don't open the prompt.

Edit prompt on non-authored message

img

Error in console (standard discord error)

img

@joe27g
Copy link
Owner

joe27g commented Apr 15, 2020

Guess it's about time this became a documented issue. Anyway, the reason this still exists is because it was my intention to add a "copy mode" for other people's messages that wouldn't allow you to attempt to edit the message. So the fix for this bug includes a new feature.

Also, a related issue with this plugin is that it no longer allows you to edit messages in channels you no longer have permission to post in. Unless the API has been updated, you can still do this, even though the UI normally blocks you.

@Column01
Copy link
Author

I was looking to patch the plugin myself and provide a fix for the issue but couldn't find how to get the client's user ID (found the message author info in the message object and was just going to compare the IDs).

@Column01
Copy link
Author

Column01 commented Apr 15, 2020

I suppose this also applies to the click delete too then.
EDIT: Maybe not. Should just alert the user if they don't have permissions to delete messages.

@joe27g joe27g added category: plugins Related to a specific plugin, or new plugin request. priority: medium Somewhat important, but doesn't require immediate attention. status: planned Considered as a to-do; will be worked on in the near future type: bug Something isn't working type: enhancement New feature or request labels Jun 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
category: plugins Related to a specific plugin, or new plugin request. priority: medium Somewhat important, but doesn't require immediate attention. status: planned Considered as a to-do; will be worked on in the near future type: bug Something isn't working type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants