=== BirdyChat ===
Contributors: birdychat
Tags: birdychat code
Donate link: https://birdychat.com
Requires at least: 5.0
Tested up to: 6.9
Requires PHP: 7.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Easily add BirdyChat to your WordPress site. This plugin automatically inserts BirdyChat JavaScript code below the closing body tag.

== Description ==

= Insert BirdyChat JavaScript Code Into WordPress Footer =

This plugin is designed for users of [BirdyChat](https://birdychat.com), allowing them to install the BirdyChat Telegram widget on any WordPress website.

Steps to get started:

1. Start the bot: [t.me/birdychat_bot](https://t.me/birdychat_bot)
2. Open the mini app.
3. Copy the code and paste it into the textarea below.

It simplifies the process of adding BirdyChat JavaScript code without the need to edit the theme's `functions.php` file.

== How the plugin works ==

User copies the widget code from the telegram bot (https://t.me/birdychat_bot) and pastes it into the textarea. The widget embed code consist of two parts: 
    1. External resource loader: `<script src="https://birdychat.com/js/chat-widget.js"></script>`;
    2. Initialization snippet: 
`<script>
  document.addEventListener('DOMContentLoaded', function() {
    AdminChatWidget.init({ widgetId: '...' });
  });
</script>`.
The plugin extracts widgetId parameter and validates it.
If successful, the both scripts are enqueued in the footer section of every WordPress page.

== External services ==
This plugin relies on an external service provided by https://birdychat.com (terms of use: https://birdychat.com/terms-and-conditions, privacy policy: https://birdychat.com/privacy-policy).
The plugin first checks that the widgetId is in UUID format (e.g. 123e4567-e89b-12d3-a456-426655440000), then calls the API at https://router.birdychat.com/getserverurl/ to confirm the ID exists in the BirdyChat database. 
This call is made once, when the user saves the widget embed code.

== Frequently Asked Questions ==

= Who is it for? =

* Solopreneurs and Independent Professionals:
    1. Perfect for freelancers, consultants, brokers, and dealers.
    2. Ideal for online shops and consultancy services where clients appreciate a private chat option for quick consultations.
    3. For impatient customers who dislike filling out contact forms and prefer getting instant answers to their questions.

= Do I need a Telegram account =

Yes, but most people already have it.


== Screenshots ==

1. WordPress birdychat plugin settings page corresponds to `landing.png`. Screenshots are stored in the /assets/images/screenshots/.


== Changelog ==

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 1.0.0 =
* Install the first version.
