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

Discord: Mark edited webhook messages with a pencil icon #682

Closed
wants to merge 3 commits into from

Conversation

nylen
Copy link
Contributor

@nylen nylen commented Jan 9, 2019

When using a webhook to send messages to Discord with avatar spoofing, edited messages are posted twice. This is because Discord doesn't allow editing a message sent by a webhook.

We can't fix that, but we can make a cosmetic improvement to make it clearer that the second copy of the message is actually an edit of the previous message:

In (Slack) Out (Discord)
2019-01-08t23 02 26-05 00 2019-01-08t23 02 44-05 00

bwmarrin/discordgo#622 will allow further improvements, for example:

  • Remove the hack of using -webhook- as a placeholder for the ID of the original message on Discord
  • Add a 📝 reaction to the original message to make it clearer that it has been edited

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found some fixes!

P.S. share your ideas, feedbacks or issues with us at https://github.com/fixmie/feedback (this message will be removed after the beta stage).

@patcon
Copy link
Contributor

patcon commented Jan 9, 2019

Related (as the edit format might not suit all bridge platforms or use-case): #614

@42wim
Copy link
Owner

42wim commented Jan 13, 2019

Good idea!
Seems like I haven't implemented the EditSuffix for the discord webhook.
The rest of my comment is the same as in #683
We could make a EditPrefix instead of hardcoding this.

@nylen
Copy link
Contributor Author

nylen commented Jan 18, 2019

Seems like I haven't implemented the EditSuffix for the discord webhook.

Cool, I'll take a look at this. I didn't know there was an EditSuffix setting.

We could make a EditPrefix instead of hardcoding this.

I'd also be fine with a suffix here actually. Maybe we should start with that, and see if we still want a prefix in another PR?

@42wim
Copy link
Owner

42wim commented Jan 18, 2019

@nylen would be great if you would make a PR to have EditSuffix fixed for webhooks too!
If the suffix works and is enough, we don't need the prefix one.

@patcon
Copy link
Contributor

patcon commented Jan 19, 2019

To clarify, at risk of beating a dead horse: the prefix-suffix decision is a moot point if we instead lean on templating for message types <3

EditSuffix can be deprecated in favour of smthng like EditFormat, with:

  • default: EditFormat="{{content}}"
  • suffix via EditFormat="{{content}} (edited)"
  • prefix via EditFormat="[:pencil:] {{content}}"
  • etc etc

@42wim
Copy link
Owner

42wim commented Feb 7, 2019

@nylen did you test it with the EditSuffix ? if so can we close this PR? and the other about slack ?

@nylen
Copy link
Contributor Author

nylen commented Mar 11, 2019

Closing. I haven't had time to revisit this but it is probably covered by existing functionality.

@nylen nylen closed this Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants