I have an even worse suggestion. Prefetch the URL with the period and if that 404s fetch the URL without the period.
Discussion
I was totally joking on this but in my testing on how Slack handles this edge case there was a brief moment before it excluded the trailing period from the link.
It seems they do some kind of prefetch request to see if the link should include the period.