Skip to content

Support for non-uids in interactivity

Created by: VelvetThePanda

Summary

Fixes an issue where using the same id in multiple messages, and then using interactivity on those same messages would overwrite the previous result, causing one time out to cancel every message with the same id

Changes proposed

  • Change ConcurrentDictionary<string, T> to ConcurrentHashSet<T>
  • Change all instances of id and message.Id.ToString(CultureInfo.InvariantCulture) to message
  • Change ComponentMatchRequest's Id property to DiscordMessage
  • Rename aforementionedProperty to Message (TargetMessage would likely be more apt)

Notes

This should avoid a very minute performance regression caused by enumerating a concurrent collection, and concurrent HashSet at that by checking if the target message matches before checking the predicate. It's probably literally a fraction of a ns, but who cares.

Merge request reports