sendForwardMessage method Null safety
- @Deprecated('sendForwardMessage has been deprecated since 3.6.0, we separate the creation of the message from the sending of the message, please use createForwardMessage to create a message first, and then call sendMessage to send the message')
- {required String msgID,
- required String receiver,
- required String groupID,
- MessagePriorityEnum priority = MessagePriorityEnum.V2TIM_PRIORITY_NORMAL,
- bool onlineUserOnly = false,
- bool isExcludedFromUnreadCount = false,
- OfflinePushInfo? offlinePushInfo,
- String? webMessageInstance}
@Deprecated('sendForwardMessage has been deprecated since 3.6.0, we separate the creation of the message from the sending of the message, please use createForwardMessage to create a message first, and then call sendMessage to send the message')
Forward a message
If you need to forward a message, you cannot directly call the sendMessage API to send the original message. Instead, you need to call createForwardMessage to create a forward message first and send it.
Parameter message: Message object to be forwarded. The message status must be V2TIM_MSG_STATUS_SEND_SUCC. The message type cannot be V2TIMGroupTipsElem. Back Forward message object. The elem content is the same as the original message.
Note The webMessageInstance field must be passed in when using on the web side. The message instance returned on the web side will contain this field
Implementation
@Deprecated(
'sendForwardMessage has been deprecated since 3.6.0, we separate the creation of the message from the sending of the message, please use createForwardMessage to create a message, and then call sendMessage to send the message')
Future<V2TimValueCallback<V2TimMessage> ;> sendForwardMessage(
{required String msgID,
required String receiver,
required String groupID,
MessagePriorityEnum priority = MessagePriorityEnum.V2TIM_PRIORITY_NORMAL,
bool onlineUserOnly = false,
bool isExcludedFromUnreadCount = false,
OfflinePushInfo ? offlinePushInfo,
String? webMessageInstance}) async {
return await ImFlutterPlatform.instance.sendForwardMessage(
msgID: msgID,
receiver: receiver,
groupID: groupID,
priority: EnumUtils.convertMessagePriorityEnum(priority) ,
onlineUserOnly: onlineUserOnly,
isExcludedFromUnreadCount: isExcludedFromUnreadCount,
offlinePushInfo: offlinePushInfo?.toJson(),
webMessageInstance: webMessageInstance);
}