apply Reference
Merges the pending TextMessage with the current reference.
If a reference message exists (reference bar shown above the input), fills the text and MentionedInfo from textMessage into ReferenceMessage, hides the reference bar, and returns the ReferenceMessage; otherwise returns textMessage as-is.
Return
a ReferenceMessage with the reference, or the original textMessage if none
Parameters
text Message
the plain text message constructed from the input field