Open FreneticScribbler opened 2 weeks ago
Can we just regex for an event identifier in the title and do it that way?
I don't think we need to do much else smart, people can manually add a forum thread when editing the rig, if we want to we could search new post bodies for RIGS embeds?
Agree that it should gracefully handle.
This issue is manifesting as RIGS-29 in Sentry for those with access.
Basing it on the embed would be better as people are much better trained to include that than to follow the sort-of-standardised 'rig number | rig title' format.
How would we deal with the case of multiple embeds of the same rig?
I think only adding a URL in if there is not already a URL is probably the safest way to do it.
We can also constrain by forum area etc. and also only look at top level posts?
Pretty sure I already setup the webhook to only fire on top level posts in #rig-info
So - I guess I made an assumption that nobody would remove the rig number from the automatically generated title from the 'add forum thread' button.
Clearly, I should never have relied on that assumption... Need to insert a hidden field with it in, or something (though I suppose this would still be user over writable). At the very least the code needs to more gracefully abort...
https://github.com/nottinghamtec/PyRIGS/blob/93762fe198b54d0d48c2715351ba042e4287bffb/RIGS/views/rigboard.py#L418
Whoops.