=== AndKo Notifier for MAX ===
Contributors: andkoru
Tags: max, messenger, autopublish, notifications, social
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automatically publish your WordPress posts to a chat or channel in the MAX messenger via the official Bot API.

== Description ==

**AndKo Notifier for MAX** removes the manual routine: as soon as a new post is published on your site, the plugin sends a message about it to your chosen chat or channel in the MAX messenger — no more copying titles, links, and hashtags by hand.

This plugin is built specifically for auto-publishing blog posts and is not a form-integration plugin. If you need to forward form submissions (Contact Form 7, etc.) to MAX, look for other plugins in the MAX category instead.

= Free version features =

* Automatic message sending when a post is published
* Manual send / resend — a button available both in the post list and in the editor
* Flexible configuration: choose which post types trigger sending, enable/disable auto-publish
* Built-in diagnostics: test the connection to the MAX API, find your Chat ID right from the admin screen
* Support for uploading a Russian National Certification Authority certificate (for cases where the MAX API connection fails with an SSL error)
* Clickable link to the post, an emoji before the title, and a category hashtag

= Advanced formatting (AndKo Notifier Pro for MAX) =

A separate paid add-on, [AndKo Notifier Pro for MAX](https://andko.ru/max-notifier/), adds:

* An automatic table of contents built from the post's H2/H3 headings, styled as a quote block
* A custom emoji for each blog category
* A hashtag that links directly to the category archive page
* Attaching the post's featured image to the message
* A fully custom message template

Installing Pro is optional — the free version is fully self-contained and works without any time or usage limits.

== External services ==

This plugin connects to one external service: the official MAX messenger Bot API (`platform-api2.max.ru`), in order to send messages on behalf of your bot to the selected chat or channel.

What is sent: the post title, its link, an excerpt (or the extended formatting described above if the Pro add-on is active), plus the bot token and chat ID you enter in the plugin settings — these are required to authorize the request and address the message correctly.

A request is only made when a post is published (if auto-publish is enabled) or when you manually click "Send to MAX". No other site or visitor data is transmitted by this plugin.

This service is provided by the company responsible for the MAX messenger. Terms of use: https://legal.max.ru/ps

Additionally, if you encounter an SSL certificate error, the plugin offers an optional download of the Russian National Certification Authority certificate from `gu-st.ru`. This only happens when you explicitly click the upload button in the plugin settings and is unrelated to the plugin's automatic operation.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install it via "Plugins → Add New" in your WordPress admin.
2. Activate the plugin from the "Plugins" menu.
3. Create a bot in MAX through the system MasterBot (`/newbot` command) and get your token.
4. Go to "Settings → AndKo Notifier for MAX", enter the token, and find your Chat ID using the built-in button.
5. Enable auto-publish (enabled by default) and save the settings.

== Frequently Asked Questions ==

= Do I need a separate server or webhooks? =

No, the plugin communicates directly between your site and the MAX API — no additional services are required.

= What should I do about an SSL certificate error? =

Upload the Russian National Certification Authority certificate right from the plugin settings page — instructions and the upload button are on the settings screen.

= Are drafts or scheduled posts sent? =

No, a message is only sent once a post's status changes to "Published".

= What does the paid version add? =

The paid add-on (AndKo Notifier Pro for MAX) adds advanced message formatting — see the Description section for details.

== Screenshots ==

1. Plugin settings screen
2. Example message in a MAX channel

== Changelog ==

= 2.0.0 =
* Split the plugin into a free core and a separate Pro add-on with advanced formatting
* Added extension hooks for third-party add-ons

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 2.0.0 =
Advanced formatting moved to the paid Pro add-on. Free version delivery works unchanged.
