Arnold The only way currently to avoid this problem is to never delete posts permanently.
Alternatively, you can merge something into a new thread without deleted posts, but that will break pretty much every link to the original thread because the extension doesn't edit the post references when merging that way.
Frankly I'm unsure why post numbers are such a problem. If this is a problem that is solvable by:
- split every discussion fragment (blocks of posts without missing posts in between) of the problematic discussion into a new discussion
- merge all new discussions into a single discussion
- merge the discussion you initially wanted to merge into the newly created discussion
then it's not like we don't know how to solve it. Just because it isn't the most elegant solution doesn't mean someone should wait until Flarum core changes this with the 20th rewrite in the year 2030. If I knew more about this problem then perhaps we could develop a more sophisticated mechanism, but at this time I barely have the time to develop priority stuff we need, let alone scout the code to understand a seemingly trivial bug.