Modmail icon indicating copy to clipboard operation
Modmail copied to clipboard

Support editing and deleting plain messages

Open fourjr opened this issue 5 years ago • 6 comments

Related to #2872

This issue only exists in v3.7.0+

Current limitations:

  • Edit and delete use embed author url to find linked messages
  • Plain messages do not make use of embeds and do not have this url

Solution:

  • Link messages in database

Timeline: Post-v4.0 #2794

fourjr avatar Nov 06 '20 17:11 fourjr

Good idea

wolfier74 avatar Nov 22 '20 07:11 wolfier74

Save message ids or links to database, when thread is closed remove it from database

wolfier74 avatar Dec 11 '20 13:12 wolfier74

There is no use spamming our issues with "bumps". If you know want to add the feature yourself, you can learn python and create a pull request.

fourjr avatar Dec 12 '20 06:12 fourjr

What about if we grab the plain message id in DM channel and put it in author.url (or footer) when creating an embed for it in thread channel. Since it's just one way plain (in DM), right? Would it be possible to link those messages later?

Jerrie-Aries avatar Jan 14 '21 12:01 Jerrie-Aries

Actually kinda surprised this issue is open for so long, I dont really think it needs a database migration as you originally thought @fourjr.

As Jerrie suggested, when the message is sent in the DM channel, the message id can be grabbed and added in the footer of the message sent in the thread channel. This way, when edit/delete is called, it looks at the footer, does a simple regex to get the message id and gets the member id, fetches the member object and uses member.fetch_message(id) to fetch the message object which can then be edited/deleted.

I would work on this but the whole sending the message code is really confusing to understand

Atharv-Agarwal avatar Sep 09 '22 17:09 Atharv-Agarwal

Now, with multi users support for threads, I think saving the message IDs in the footer is no longer a good idea.

I 'd still suggest using the database for this feature. I have the models for this and been using it on my instance for about a year. It's similar with my last PR (closed) plus some improvements.

I'm still interested in this but don't have time to do it.

Jerrie-Aries avatar Sep 10 '22 10:09 Jerrie-Aries