Skip to content

Conversation

@kg345
Copy link

@kg345 kg345 commented Oct 2, 2020

With Spring 19, hyperlink support was added.

https://releasenotes.docs.salesforce.com/en-us/spring19/release-notes/rn_chatter_hyperlinks.htm

This adds that functionality noted by the following issue: #17

@salesforce-cla
Copy link

salesforce-cla bot commented Oct 2, 2020

Thanks for the contribution! Before we can merge this, we need @kg345 to sign the Salesforce.com Contributor License Agreement.

@rapsacnz
Copy link

I have been using this addition and I like it. Works very well.

@SwiCitairLoWELAwA
Copy link

I think, this two lines should be added to ConnectApiHelper.createInputFromBody:

markupBeginInput.url = markupBeginOutput.url;
markupBeginInput.altText = markupBeginOutput.altText;

See the place: https://github.com/forcedotcom/ConnectApiHelper/pull/30/files#diff-7e83dc2714494f8be54d84615a298f2c110372f690bca3bed0271fc4b2770db9R354

Otherwise we're getting this error FATAL_ERROR ConnectApi.ConnectApiException: Value of "url" must be not be null.

// item.body contains <a href="https://google.com" title="https://google.com">link</a>
ConnectApi.FeedItem item = ...;

ConnectApi.FeedItemInput input = ConnectApiHelper.createFeedItemInputFromBody(item.body);
ConnectApi.ChatterFeeds.updateFeedElement(communityId, item.id, input);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants