PonyEventsFederation / CanniJS

Canni Discord Bot
MIT License
4 stars 5 forks source link

[Bug] canni should ignore certain edits or ignore all edits #119

Closed meadowsys closed 3 years ago

meadowsys commented 3 years ago

Issue description

the way I added a hug typo fix was to emit a message send event whenever someone edited a message, so that message would get processed again. however, sometimes someone edits a message without intending to retrigger canni, but it contains a trigger, and then weird things happen. (see screenshot below)

Steps to reproduce the behavior

  1. send a message containing a trigger (like hallo fanta for example)
  2. edit the message, but keep trigger (like edit to hallo fanta edited for example)
  3. observe canni is triggered again

Expected result

she should be able to tell the difference between intentional edits (like editing hgu @person to hug @person). most people don't know this editing functionality is there, so removing it could be a solution as well since no one really edits their messages to fix a command typo

Actual result

she processes everything as if they're a new message

Screenshots

image image image

Additional information

the editing behaviour was initially intentional, but overlooked some problems. fixing may be more hassle than its worth, since not much people use this edit functionality or expect it

meadowsys commented 3 years ago

edit feature was disabled in d0017ce5be8aef6fdb2a758ac08eefa973d9458a, unsure if it’s a good idea to reimplement a smarter version (may be too complex and not worth maintaining), closing for now