rohitsangwan01 / whatsapp_bot_flutter

Whatsapp bot for flutter desktop
MIT License
41 stars 27 forks source link

[New feature] Send & Remove message reaction #27

Closed loic-hamdi closed 1 year ago

loic-hamdi commented 1 year ago

Hey Rohit,

Tested ✅ It is working fine.

Add in wpp_chat.dart:

  /// Emoji list: https://unicode.org/emoji/charts/full-emoji-list.html
  /// To remove reaction, set [emoji] to null
  Future sendReactionToMessage({
    required MessageId messageId,
    String? emoji,
  }) async {
    String? serialized = messageId.serialized;
    return await wpClient.evaluateJs(
      '''WPP.chat.sendReactionToMessage(${serialized.jsParse}, ${emoji != null ? emoji.jsParse : false});''',
      methodName: "sendReactionToMessage",
    );
  }
rohitsangwan01 commented 1 year ago

Hey @loic-hamdi can you open a pull request for this

rohitsangwan01 commented 1 year ago

Fixed in https://github.com/rohitsangwan01/whatsapp_bot_flutter/pull/28