MessageParams.contact constructor

MessageParams.contact({
  1. required String toJid,
  2. String? replyMessageId,
  3. required ContactMessageParams contactMessageParams,
  4. List<MessageMetaData> metaData = const [],
  5. String topicId = "",
})

Constructs a MessageParams object for a Contact message.

Implementation

factory MessageParams.contact({
  required String toJid,
  String? replyMessageId,
  required ContactMessageParams contactMessageParams,
  List<MessageMetaData> metaData = const [],
  String topicId = "",
}) {
  return MessageParams._(
    toJid: toJid,
    replyMessageId: replyMessageId,
    messageType: MessageType.contact,
    contactMessageParams: contactMessageParams,
    metaData: metaData,
    topicId: topicId,
  );
}