forwardMessagesToMultipleUsers static method

Future<void> forwardMessagesToMultipleUsers({
  1. required List<String> messageIds,
  2. required List<String> userList,
  3. required dynamic flyCallBack(
    1. FlyResponse response
    ),
})

This method forwards a list of messages to multiple users. Upon completion, the flyCallBack function is invoked with a FlyResponse object, which contains information about the success or failure of the operation.

Parameters: messageIds - A list of message IDs that are to be forwarded. userList - A list of JIDs (Jabber IDs) of the users to whom the messages are to be forwarded.

Returns: flyCallBack - A callback function that is called with a FlyResponse object upon completion.

Example usage:

await Mirrorfly.forwardMessagesToMultipleUsers(
  messageIds: ["messageId1", "messageId2"],
  userList: ["user123@example.com", "user456@example.com"],
  flyCallBack: (response) {
    if (response.isSuccess) {
      print("Messages forwarded successfully");
    } else {
      print("Failed to forward messages: ${response.errorMessage}");
    }
  },
);

Implementation

static Future<void> forwardMessagesToMultipleUsers(
    {required List<String> messageIds,
    required List<String> userList,
    required Function(FlyResponse response) flyCallBack}) {
  return FlyChatFlutterPlatform.instance
      .forwardMessagesToMultipleUsers(messageIds, userList, flyCallBack);
}