Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support editing and deleting plain messages #2876

Open
fourjr opened this issue Nov 6, 2020 · 6 comments
Open

Support editing and deleting plain messages #2876

fourjr opened this issue Nov 6, 2020 · 6 comments

Comments

@fourjr
Copy link
Collaborator

fourjr commented Nov 6, 2020

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

@wolfier74
Copy link

Good idea

@wolfier74
Copy link

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

@fourjr
Copy link
Collaborator Author

fourjr commented Dec 12, 2020

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.

@Jerrie-Aries
Copy link
Contributor

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?

@Atharv-Agarwal
Copy link
Member

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

@Jerrie-Aries
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants