code: public static MessageToSend createMessage(@NonNull String conversationId, @NonNull String body, @Nullable String title) {
  
          Map<String, Object> fcm = new HashMap<>();
          String fcmMsg = !TextUtils.isEmpty(body) ? body : "attachments";
          fcm.put("notification", new Notification(title != null ? title : conversationId, fcmMsg, conversationId));
          Map<String, Object> apns = new HashMap<>();
          apns.put("alert", fcmMsg);
  
          MessageToSend.Builder builder = MessageToSend.builder();
          if (!TextUtils.isEmpty(body)) {
              Part bodyPart = Part.builder().setData(body).setName("body").setSize(body.length()).setType("text/plain").build();
              builder.addPart(bodyPart);
          }
          return builder.setAlert(fcm, apns).build();
      }
docs: Convenience method to create a Message object with a single text body part.
  
  @param conversationId Unique conversation id.
  @param body           Message text body.
  @param title          Remote notification title.
  @return Message object that can by sent to other participants of the conversation.