forwardTextMessage method
forwardTextMessage may throw errors if passed an invalid contact or if this method completed without any issue , then probably message sent successfully
Implementation
Future<Message?> forwardTextMessage({
required String phone,
required MessageId messageId,
bool displayCaptionText = false,
bool multicast = false,
}) async {
String? serialized = messageId.serialized;
var result = await wpClient.evaluateJs(
'''window.WPP.chat.forwardMessage(${phone.phoneParse}, ${serialized.jsParse}, {
displayCaptionText: $displayCaptionText,
multicast: $multicast,
});''',
methodName: "forwardMessage");
return Message.parse(result).firstOrNull;
}