I have create a new flag action link for my rest API which returns the href of the flagging/unflagging link. When I set the link type in flag to my custom action link it is applied throughout the site and all the flag links are rendered in the same way, which is not required.
Pass a new parameter in flagLinkBuilder->build for $link_type. If this parameter is present then that particular link type will be returned or else the default one set in flag config.
Needs work
4.0
Flag core
The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.