Mentions extension don't work for custom messages

Hi everyone!

How come mentions are not captured when sending custom messages?

Below are some dev details:

  • I followed this Document On Mention Extension
  • Got mentions working for Text Messages
  • So now I’m attempting to make mentions work for Custom Messages
  • Mentions extension is enabled in the app’s extension section
  • I’m using the Javascript SDK method CometChat.sendCustomMessage
  • I’ve removed the 3rd-party rich text editor & disabled the text transformation to the mentions format to simplify debugging
  • Made sure that a sample message or the customData parameter of the method above contains a mention which follows the format @{Name|UID}
  • By calling the CometChat.callExtension for mentions, the resulting list of messages/mentions are of text message type only and none for custom message type, so I assume that mentions are not captured/working for custom messages (I specifically used CometChat.callExtension('mentions', 'GET', 'v1/fetch', null) to get the list of message with mentions OR to check if mentions were captured)

What did I missed? Thanks!

Hello,

The mentions extensions work only for text messages. This is because a custom message can have custom fields in it. The names of these fields depend on the use case of the client.
Hence, what you’re trying to achieve won’t work for mentions.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.