club-1 / flarum-ext-cross-references

Add cross reference links when a discussion is mentioned from another one.
GNU Affero General Public License v3.0
6 stars 1 forks source link

Integration with `flarum/mentions` extension #20

Open n-peugnet opened 1 year ago

n-peugnet commented 1 year ago

Add back-reference when a post is mentioned from another discussion using flarum/mentions extension.

rob006 commented 1 year ago

It definitely works correctly for mentions, so this may be a good example how to implement this in this extension, since the functionality is quite similar. However, I think there is one problem with current schema of discussion_reference - currently it tracks discussion-to-discussion relations. But for including data in payload it makes sense to store information also about post with link to discussion and generated EventPost. In this way you can include info about linked discussions using PostSerializer, so payload will contain info only about discussion needed to handle current page. I you useDiscussionSerializer, payload will contain all linked discussion, even if none of them is visible on current page - it could be a real problem for large discussions with lots of references.

n-peugnet commented 1 year ago

@rob006 isn't this comment about #13 ?

rob006 commented 1 year ago

Yes, sorry. I definitely have too many tabs opened...