Package com.restfb.util
Class MessageTagUtils
java.lang.Object
com.restfb.util.MessageTagUtils
Helper to transform a Graph API
message + message_tags pair into a normalized representation that
uses the mention syntax (e.g. @[12345]).-
Method Summary
Modifier and TypeMethodDescriptionstatic StringnormalizeMessage(String message, List<MessageTag> tags) Rebuilds a message so that tagged segments are replaced by their mention syntax.
-
Method Details
-
normalizeMessage
Rebuilds a message so that tagged segments are replaced by their mention syntax.- Parameters:
message- original text returned by the Graph APItags- message tags as returned by the Graph API- Returns:
- the normalized message or the original one if the tags don't provide enough information
-