messageSendCustomContent method

Future<EasyPacket<void>> messageSendCustomContent({
  1. required dynamic sid,
  2. required int from,
  3. String? title,
  4. String? body,
  5. dynamic shareCardId,
  6. String? shareIconUrl,
  7. List<String>? shareHeadUrl,
  8. String? shareLinkUrl,
  9. required int customType,
  10. String? customShort,
  11. Map<String, dynamic>? customExtra,
})

发送消息-自定义消息,customType为自定义类型,customExtra为扩展数据

Implementation

Future<EasyPacket<void>> messageSendCustomContent({required ObjectId sid, required int from, String? title, String? body, ObjectId? shareCardId, String? shareIconUrl, List<String>? shareHeadUrl, String? shareLinkUrl, required int customType, String? customShort, Map<String, dynamic>? customExtra}) async {
  final response = await _aliveClient.websocketRequest('messageSend', data: {
    'bsid': bsid,
    'sid': sid,
    'from': from,
    'type': Constant.msgTypeCustom,
    'title': title,
    'body': body,
    'shareCardId': shareCardId,
    'shareIconUrl': shareIconUrl,
    'shareHeadUrl': shareHeadUrl,
    'shareLinkUrl': shareLinkUrl,
    'customType': customType,
    'customShort': customShort,
    'customExtra': customExtra,
  });
  return response;
}