Topic Based Chat

Topic based chat lets you to group the chat by topic. You can create the topic , send all types of messages with topic information and thus you can receive the messages by topic.

Create Topic#

You can use the below given method to create a new topic.

Mirrorfly.createTopic(
topicName: TOPIC_NAME,
metaData: META_DATA,
flyCallBack: (FlyResponse response) {
if (response.isSuccess) {
print(response.data);
}
});
ArgumentTypeDescription
TOPIC_NAMEStringName of the topic (cannot be null or empty)
META_DATAList<TopicMetaData>TopicMetaData is an optional parameter to provide additional information about the topic. You can pass it as a List of TopicMetaData Maximum Size is 3

Get Topics#

You can use the below given method to get the topics details.

Mirrorfly.getTopics(topicIds: TOPIC_IDS, flyCallBack: (FlyResponse response) {
if(response.isSuccess && response.hasData) {
var topics = topicsFromJson(response.data);
}
});
ArgumentTypeDescription
TOPIC_IDSList<String>List of topic ids

Get Recent chats by Topic id#

To get all the list of TopicId related chats, use the method getRecentChatListHistoryByTopic. refer RecentChats by Topic

Send Message by Topic id#

To send the message to the user, use the same methods with topicId value. refer Send A Message