Hi everybody. I’ve faced a problem how to show error/success messages.
I’ve used AJS.flag({});
But messages were not “native” (they looked differently as other BitBucket messages)
So I found out that
AP.require('messages', function (messages) {
messages.error();
});
shows messages the same way as BitBucket does. But in this case I get an error that this approach is deprecated:
DEPRECATED API - AP.messages.error has been deprecated since ACJS 5.0 and will be removed in a future release. Use AP.flag.create instead.
When I use AP.flag.create
I got an error
connect-host.js:5820 Uncaught TypeError: AJS.flag is not a function
Can somebody suggest a correct way to show messages? Thank you