createChatroomCustomMessage static method

Future<NIMResult<NIMChatroomMessage>> createChatroomCustomMessage({
  1. required String roomId,
  2. NIMMessageAttachment? attachment,
})

Implementation

static Future<NIMResult<NIMChatroomMessage>> createChatroomCustomMessage({
  required String roomId,
  NIMMessageAttachment? attachment,
}) async {
  return NimCore.instance.chatroomService._createMessage({
    'roomId': roomId,
    'attachment': attachment?.toMap(),
    'messageType': 'custom',
  });
}