DEV: stop using the deprecated cookAsync function (#247)

The cookAsync functions is deprecated since discourse/discourse@fcc9d99.
This commit is contained in:
Andrei Prigorshnev 2023-10-11 20:48:37 +04:00 committed by GitHub
parent 3bced1c6f5
commit 4877394081
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -1,3 +1,4 @@
3.2.0.beta2: 3bced1c6f525553fe2b5b79d29bd66c1cf2a47d5
3.1.999: c0415bb7eb878b1b7abf112d65cba981030df8df
< 3.2.0.beta1-dev: 3e7c99de894b03e9161d9481da118fe893991a1d
3.1.0.beta3: 057fbe1ce6

View File

@ -1,5 +1,5 @@
import { withPluginApi } from "discourse/lib/plugin-api";
import { cookAsync } from "discourse/lib/text";
import { cook } from "discourse/lib/text";
import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error";
import loadScript from "discourse/lib/load-script";
@ -92,7 +92,7 @@ function initializeAIBotReplies(api) {
if (post) {
if (data.raw) {
cookAsync(data.raw).then((cooked) => {
cook(data.raw).then((cooked) => {
post.set("raw", data.raw);
post.set("cooked", cooked);