Compare commits
28 Commits
version/01.08.00
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| a8dae85f42 | |||
| d3bc62f810 | |||
| 13683adfba | |||
| e183b62aba | |||
| ce9d72b50d | |||
| 92358a673b | |||
| 99308cd7a4 | |||
| 561ba24090 | |||
| 3e1cb9a500 | |||
| 5ae8e3e001 | |||
| faea3637e0 | |||
| 79eaa5217d | |||
| 0e0891f1a8 | |||
| 33aaf666ae | |||
| a634938799 | |||
| 14ff4ab2f1 | |||
| b3de21e7d1 | |||
| 72a373b17c | |||
| bc290f3bed | |||
| a4704ad267 | |||
| d1762ad5df | |||
| df1467c518 | |||
| 7cdd97ca59 | |||
| 5b36d10b04 | |||
| 56699fdd4d | |||
| fcf1cc41c8 | |||
| b8640ccb1d | |||
| ca06298e64 |
@@ -1,126 +0,0 @@
|
|||||||
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
#
|
|
||||||
# FILE INFORMATION
|
|
||||||
# DEFGROUP: Gitea.Workflow
|
|
||||||
# INGROUP: MokoStandards.Deploy
|
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
|
|
||||||
# PATH: /templates/workflows/joomla/deploy-manual.yml.template
|
|
||||||
# VERSION: 04.07.00
|
|
||||||
# BRIEF: Manual SFTP deploy to dev server for Joomla repos
|
|
||||||
|
|
||||||
name: "Universal: Deploy to Dev (Manual)"
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
clear_remote:
|
|
||||||
description: 'Delete all remote files before uploading'
|
|
||||||
required: false
|
|
||||||
default: 'false'
|
|
||||||
type: boolean
|
|
||||||
|
|
||||||
env:
|
|
||||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
name: SFTP Deploy to Dev
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
||||||
|
|
||||||
- name: Setup PHP
|
|
||||||
run: |
|
|
||||||
php -v && composer --version
|
|
||||||
|
|
||||||
- name: Setup MokoStandards tools
|
|
||||||
env:
|
|
||||||
GA_TOKEN: ${{ secrets.GA_TOKEN || secrets.GA_TOKEN || github.token }}
|
|
||||||
MOKO_CLONE_TOKEN: ${{ secrets.GA_TOKEN || secrets.GA_TOKEN || github.token }}
|
|
||||||
MOKO_CLONE_HOST: ${{ secrets.GA_TOKEN && 'git.mokoconsulting.tech/MokoConsulting' || 'github.com/mokoconsulting-tech' }}
|
|
||||||
COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GA_TOKEN || github.token }}"}}'
|
|
||||||
run: |
|
|
||||||
git clone --depth 1 --branch main --quiet \
|
|
||||||
"https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \
|
|
||||||
/tmp/mokostandards-api 2>/dev/null || true
|
|
||||||
if [ -d "/tmp/mokostandards-api" ] && [ -f "/tmp/mokostandards-api/composer.json" ]; then
|
|
||||||
cd /tmp/mokostandards-api && composer install --no-dev --no-interaction --quiet 2>/dev/null || true
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Check FTP configuration
|
|
||||||
id: check
|
|
||||||
env:
|
|
||||||
HOST: ${{ vars.DEV_FTP_HOST }}
|
|
||||||
PATH_VAR: ${{ vars.DEV_FTP_PATH }}
|
|
||||||
PORT: ${{ vars.DEV_FTP_PORT }}
|
|
||||||
run: |
|
|
||||||
if [ -z "$HOST" ] || [ -z "$PATH_VAR" ]; then
|
|
||||||
echo "DEV_FTP_HOST or DEV_FTP_PATH not configured -- cannot deploy"
|
|
||||||
echo "skip=true" >> "$GITHUB_OUTPUT"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
echo "skip=false" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "host=$HOST" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
REMOTE="${PATH_VAR%/}"
|
|
||||||
echo "remote=$REMOTE" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
[ -z "$PORT" ] && PORT="22"
|
|
||||||
echo "port=$PORT" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Deploy via SFTP
|
|
||||||
if: steps.check.outputs.skip != 'true'
|
|
||||||
env:
|
|
||||||
SFTP_KEY: ${{ secrets.DEV_FTP_KEY }}
|
|
||||||
SFTP_PASS: ${{ secrets.DEV_FTP_PASSWORD }}
|
|
||||||
SFTP_USER: ${{ vars.DEV_FTP_USERNAME }}
|
|
||||||
run: |
|
|
||||||
SOURCE_DIR="src"
|
|
||||||
[ ! -d "$SOURCE_DIR" ] && SOURCE_DIR="htdocs"
|
|
||||||
[ ! -d "$SOURCE_DIR" ] && { echo "No src/ or htdocs/ -- nothing to deploy"; exit 0; }
|
|
||||||
|
|
||||||
printf '{"host":"%s","port":%s,"username":"%s","remotePath":"%s"' \
|
|
||||||
"${{ steps.check.outputs.host }}" "${{ steps.check.outputs.port }}" "$SFTP_USER" "${{ steps.check.outputs.remote }}" \
|
|
||||||
> /tmp/sftp-config.json
|
|
||||||
|
|
||||||
if [ -n "$SFTP_KEY" ]; then
|
|
||||||
echo "$SFTP_KEY" > /tmp/deploy_key
|
|
||||||
chmod 600 /tmp/deploy_key
|
|
||||||
printf ',"privateKeyPath":"/tmp/deploy_key"}' >> /tmp/sftp-config.json
|
|
||||||
else
|
|
||||||
printf ',"password":"%s"}' "$SFTP_PASS" >> /tmp/sftp-config.json
|
|
||||||
fi
|
|
||||||
|
|
||||||
DEPLOY_ARGS=(--path . --src-dir "$SOURCE_DIR" --config /tmp/sftp-config.json)
|
|
||||||
[ "${{ inputs.clear_remote }}" = "true" ] && DEPLOY_ARGS+=(--clear-remote)
|
|
||||||
|
|
||||||
PLATFORM=$(php /tmp/mokostandards-api/cli/platform_detect.php --path . 2>/dev/null || true)
|
|
||||||
if [ "$PLATFORM" = "waas-component" ] && [ -f "/tmp/mokostandards-api/deploy/deploy-joomla.php" ]; then
|
|
||||||
php /tmp/mokostandards-api/deploy/deploy-joomla.php "${DEPLOY_ARGS[@]}"
|
|
||||||
else
|
|
||||||
php /tmp/mokostandards-api/deploy/deploy-sftp.php "${DEPLOY_ARGS[@]}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f /tmp/deploy_key /tmp/sftp-config.json
|
|
||||||
|
|
||||||
- name: Summary
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
if [ "${{ steps.check.outputs.skip }}" = "true" ]; then
|
|
||||||
echo "### Deploy Skipped -- FTP not configured" >> $GITHUB_STEP_SUMMARY
|
|
||||||
else
|
|
||||||
echo "### Manual Dev Deploy Complete" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "| Field | Value |" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "|-------|-------|" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "| Host | \`${{ steps.check.outputs.host }}\` |" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "| Remote | \`${{ steps.check.outputs.remote }}\` |" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "| Clear | ${{ inputs.clear_remote }} |" >> $GITHUB_STEP_SUMMARY
|
|
||||||
fi
|
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: Gitea.Workflow
|
||||||
# INGROUP: mokocli.Automation
|
# INGROUP: mokocli.Automation
|
||||||
# VERSION: 01.00.00
|
# VERSION: 01.08.12
|
||||||
# BRIEF: Auto-create feature branch when an issue is opened
|
# BRIEF: Auto-create feature branch when an issue is opened
|
||||||
|
|
||||||
name: "Universal: Issue Branch"
|
name: "Universal: Issue Branch"
|
||||||
|
|||||||
@@ -1,6 +1,15 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- **Nostr plugin**: Full NIP-01 WebSocket relay publishing with BIP-340 Schnorr signatures (pure PHP, requires ext-gmp)
|
||||||
|
- **Nostr**: Publishes kind-1 text note events to multiple relays with automatic failover
|
||||||
|
- **Nostr**: Raw WebSocket client using stream_socket_client (no external dependencies)
|
||||||
|
- **Nostr**: Public key derivation and event signing via secp256k1 elliptic curve math
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Webservices plugin Joomla 6 compatibility — `onBeforeApiRoute` receives `BeforeApiRouteEvent` object, extract router via `$event->getRouter()`
|
||||||
|
|
||||||
## [01.07.00] --- 2026-06-23
|
## [01.07.00] --- 2026-06-23
|
||||||
|
|
||||||
## [01.07.00] --- 2026-06-23
|
## [01.07.00] --- 2026-06-23
|
||||||
@@ -12,6 +21,7 @@
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- **License warning**: Removed duplicate from system plugin (install script already shows it)
|
- **License warning**: Removed duplicate from system plugin (install script already shows it)
|
||||||
|
- **Content plugin**: Fixed func_get_arg crash when non-article content is saved (e.g. update sites, installer)
|
||||||
|
|
||||||
## [01.05.00] --- 2026-06-23
|
## [01.05.00] --- 2026-06-23
|
||||||
|
|
||||||
@@ -53,3 +63,19 @@
|
|||||||
|
|
||||||
|
|
||||||
## [01.04.01] --- 2026-06-21
|
## [01.04.01] --- 2026-06-21
|
||||||
|
|
||||||
|
|
||||||
|
## [01.04.00] --- 2026-06-21
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- **Package manifest**: Added missing `plg_system_mokosuitecross_events` and `plg_system_mokosuitecross_gallery` to `pkg_mokosuitecross.xml` — these system plugins were not installed with the package
|
||||||
|
- **Cleanup**: Removed old `src/` directory (pre-rename cruft with `mokojoomcross` files)
|
||||||
|
|
||||||
|
## [01.03.00] --- 2026-06-21
|
||||||
|
|
||||||
|
|
||||||
|
<!-- VERSION: 01.08.12 -->
|
||||||
|
|
||||||
|
All notable changes to MokoSuiteCross will be documented in this file.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# MokoSuiteCross
|
# MokoSuiteCross
|
||||||
|
|
||||||
<!-- VERSION: 01.07.00 -->
|
<!-- VERSION: 01.08.12 -->
|
||||||
|
|
||||||
Cross-posting Joomla content to social media, email marketing, and chat platforms for Joomla 5/6.
|
Cross-posting Joomla content to social media, email marketing, and chat platforms for Joomla 5/6.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="component" method="upgrade">
|
<extension type="component" method="upgrade">
|
||||||
<name>com_mokosuitecross</name>
|
<name>com_mokosuitecross</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.08.05 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.08.07 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.08.08 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.08.09 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.08.10 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.08.11 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.08.12 — no schema changes */
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="content" method="upgrade">
|
<extension type="plugin" group="content" method="upgrade">
|
||||||
<name>Content - MokoSuiteCross</name>
|
<name>Content - MokoSuiteCross</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
+13
-42
@@ -270,25 +270,11 @@ XML;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add cross-post status badges before article content in admin.
|
* Add cross-post status badges before article content in admin.
|
||||||
*
|
|
||||||
* Joomla 5/6 compatible — accepts both BeforeDisplayEvent and legacy parameters.
|
|
||||||
*/
|
*/
|
||||||
public function onContentBeforeDisplay($event): string
|
public function onContentBeforeDisplay(\Joomla\CMS\Event\Content\BeforeDisplayEvent $event): string
|
||||||
{
|
{
|
||||||
// Joomla 5/6 compatibility
|
$context = $event->getContext();
|
||||||
if ($event instanceof \Joomla\CMS\Event\Content\BeforeDisplayEvent) {
|
$article = $event->getItem();
|
||||||
$context = $event->getContext();
|
|
||||||
$article = $event->getItem();
|
|
||||||
} elseif (is_string($event)) {
|
|
||||||
$context = $event;
|
|
||||||
$article = func_get_arg(1);
|
|
||||||
} else {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($context !== 'com_content.article') {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$app = $this->getApplication();
|
$app = $this->getApplication();
|
||||||
|
|
||||||
@@ -330,26 +316,18 @@ XML;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Dispatch cross-post when an article is saved and published.
|
* Dispatch cross-post when an article is saved and published.
|
||||||
*
|
|
||||||
* Joomla 5/6 compatible — accepts both AfterSaveEvent and legacy parameters.
|
|
||||||
*/
|
*/
|
||||||
public function onContentAfterSave($event): void
|
public function onContentAfterSave(\Joomla\CMS\Event\Content\AfterSaveEvent $event): void
|
||||||
{
|
{
|
||||||
// Joomla 5/6 compatibility
|
$context = $event->getContext();
|
||||||
if ($event instanceof \Joomla\CMS\Event\Content\AfterSaveEvent) {
|
|
||||||
$context = $event->getContext();
|
|
||||||
$article = $event->getItem();
|
|
||||||
$isNew = $event->getIsNew();
|
|
||||||
} else {
|
|
||||||
$context = $event;
|
|
||||||
$article = func_get_arg(1);
|
|
||||||
$isNew = func_get_arg(2);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($context !== 'com_content.article') {
|
if ($context !== 'com_content.article') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$article = $event->getItem();
|
||||||
|
$isNew = $event->getIsNew();
|
||||||
|
|
||||||
if ((int) ($article->state ?? 0) !== 1) {
|
if ((int) ($article->state ?? 0) !== 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -375,25 +353,18 @@ XML;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Dispatch cross-post when article state changes to published.
|
* Dispatch cross-post when article state changes to published.
|
||||||
*
|
|
||||||
* Joomla 5/6 compatible — accepts both ContentChangeStateEvent and legacy parameters.
|
|
||||||
*/
|
*/
|
||||||
public function onContentChangeState($event): void
|
public function onContentChangeState(\Joomla\CMS\Event\Content\ContentChangeStateEvent $event): void
|
||||||
{
|
{
|
||||||
if ($event instanceof \Joomla\CMS\Event\Content\ContentChangeStateEvent) {
|
$context = $event->getContext();
|
||||||
$context = $event->getContext();
|
|
||||||
$pks = $event->getPks();
|
|
||||||
$value = $event->getValue();
|
|
||||||
} else {
|
|
||||||
$context = $event;
|
|
||||||
$pks = func_get_arg(1);
|
|
||||||
$value = func_get_arg(2);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($context !== 'com_content.article') {
|
if ($context !== 'com_content.article') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$pks = $event->getPks();
|
||||||
|
$value = $event->getValue();
|
||||||
|
|
||||||
$params = ComponentHelper::getParams('com_mokosuitecross');
|
$params = ComponentHelper::getParams('com_mokosuitecross');
|
||||||
|
|
||||||
// Unpublish/trash: delete from platforms if configured
|
// Unpublish/trash: delete from platforms if configured
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - ActivityPub (Fediverse)</name>
|
<name>MokoSuiteCross - ActivityPub (Fediverse)</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Google Blogger</name>
|
<name>MokoSuiteCross - Google Blogger</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Bluesky</name>
|
<name>MokoSuiteCross - Bluesky</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Brevo (Sendinblue)</name>
|
<name>MokoSuiteCross - Brevo (Sendinblue)</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Constant Contact</name>
|
<name>MokoSuiteCross - Constant Contact</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - ConvertKit</name>
|
<name>MokoSuiteCross - ConvertKit</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Dev.to</name>
|
<name>MokoSuiteCross - Dev.to</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Discord</name>
|
<name>MokoSuiteCross - Discord</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Facebook / Meta</name>
|
<name>MokoSuiteCross - Facebook / Meta</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Ghost</name>
|
<name>MokoSuiteCross - Ghost</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Google Business Profile</name>
|
<name>MokoSuiteCross - Google Business Profile</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Google Chat</name>
|
<name>MokoSuiteCross - Google Chat</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Hashnode</name>
|
<name>MokoSuiteCross - Hashnode</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Instagram</name>
|
<name>MokoSuiteCross - Instagram</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-06-23</creationDate>
|
<creationDate>2026-06-23</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - LinkedIn</name>
|
<name>MokoSuiteCross - LinkedIn</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Mailchimp</name>
|
<name>MokoSuiteCross - Mailchimp</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Mastodon</name>
|
<name>MokoSuiteCross - Mastodon</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Matrix / Element</name>
|
<name>MokoSuiteCross - Matrix / Element</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Medium</name>
|
<name>MokoSuiteCross - Medium</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - MokoSuiteCalendar Events</name>
|
<name>MokoSuiteCross - MokoSuiteCalendar Events</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - MokoSuiteGallery</name>
|
<name>MokoSuiteCross - MokoSuiteGallery</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
PLG_MOKOSUITECROSS_NOSTR="MokoSuiteCross - Nostr"
|
PLG_MOKOSUITECROSS_NOSTR="MokoSuiteCross - Nostr"
|
||||||
PLG_MOKOSUITECROSS_NOSTR_DESCRIPTION="Cross-post Joomla articles to Nostr."
|
PLG_MOKOSUITECROSS_NOSTR_DESCRIPTION="Cross-post Joomla articles to Nostr relays via NIP-01 WebSocket protocol. Requires PHP ext-gmp for secp256k1 Schnorr signing."
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Nostr</name>
|
<name>MokoSuiteCross - Nostr</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -20,12 +20,18 @@ use Joomla\Event\SubscriberInterface;
|
|||||||
/**
|
/**
|
||||||
* Nostr service plugin for MokoSuiteCross.
|
* Nostr service plugin for MokoSuiteCross.
|
||||||
*
|
*
|
||||||
* Nostr uses NIP-01 WebSocket relays for event publishing.
|
* Publishes kind-1 text note events to NIP-01 WebSocket relays.
|
||||||
* This is a stub — full WebSocket implementation is deferred.
|
* Uses BIP-340 Schnorr signatures over secp256k1 (requires ext-gmp).
|
||||||
* Events are signed with the private key and sent to configured relays.
|
*
|
||||||
|
* Credentials: private_key (64-char hex nsec), relays (comma-separated wss:// URLs)
|
||||||
*/
|
*/
|
||||||
class NostrService extends CMSPlugin implements SubscriberInterface, MokoSuiteCrossServiceInterface
|
class NostrService extends CMSPlugin implements SubscriberInterface, MokoSuiteCrossServiceInterface
|
||||||
{
|
{
|
||||||
|
private const SECP256K1_P = 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F';
|
||||||
|
private const SECP256K1_N = 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141';
|
||||||
|
private const SECP256K1_GX = '79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798';
|
||||||
|
private const SECP256K1_GY = '483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8';
|
||||||
|
|
||||||
public static function getSubscribedEvents(): array
|
public static function getSubscribedEvents(): array
|
||||||
{
|
{
|
||||||
return ['onMokoSuiteCrossGetServices' => 'onMokoSuiteCrossGetServices'];
|
return ['onMokoSuiteCrossGetServices' => 'onMokoSuiteCrossGetServices'];
|
||||||
@@ -43,6 +49,10 @@ class NostrService extends CMSPlugin implements SubscriberInterface, MokoSuiteCr
|
|||||||
|
|
||||||
public function publish(string $message, array $media, array $credentials, array $params): array
|
public function publish(string $message, array $media, array $credentials, array $params): array
|
||||||
{
|
{
|
||||||
|
if (!extension_loaded('gmp')) {
|
||||||
|
return ['success' => false, 'platform_post_id' => '', 'response' => ['error' => 'PHP ext-gmp is required for Nostr signing.']];
|
||||||
|
}
|
||||||
|
|
||||||
$privateKey = $credentials['private_key'] ?? '';
|
$privateKey = $credentials['private_key'] ?? '';
|
||||||
$relays = $credentials['relays'] ?? '';
|
$relays = $credentials['relays'] ?? '';
|
||||||
|
|
||||||
@@ -50,48 +60,393 @@ class NostrService extends CMSPlugin implements SubscriberInterface, MokoSuiteCr
|
|||||||
return ['success' => false, 'platform_post_id' => '', 'response' => ['error' => 'Missing private key or relay URLs.']];
|
return ['success' => false, 'platform_post_id' => '', 'response' => ['error' => 'Missing private key or relay URLs.']];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nostr requires WebSocket connections to relays (wss://).
|
$privateKey = strtolower(trim($privateKey));
|
||||||
// Full NIP-01 event signing and relay publishing is not yet implemented.
|
|
||||||
|
if (!preg_match('/^[0-9a-f]{64}$/', $privateKey)) {
|
||||||
|
return ['success' => false, 'platform_post_id' => '', 'response' => ['error' => 'Private key must be 64 hex characters.']];
|
||||||
|
}
|
||||||
|
|
||||||
|
$pubkey = $this->getPublicKey($privateKey);
|
||||||
|
|
||||||
|
$event = $this->createEvent($pubkey, $message);
|
||||||
|
$event['sig'] = $this->schnorrSign($event['id'], $privateKey);
|
||||||
|
|
||||||
|
$relayList = array_filter(array_map('trim', explode(',', $relays)));
|
||||||
|
$lastError = '';
|
||||||
|
$published = false;
|
||||||
|
|
||||||
|
foreach ($relayList as $relayUrl) {
|
||||||
|
$result = $this->publishToRelay($relayUrl, $event);
|
||||||
|
|
||||||
|
if ($result['success']) {
|
||||||
|
$published = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$lastError = $result['error'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$published) {
|
||||||
|
return ['success' => false, 'platform_post_id' => '', 'response' => ['error' => 'All relays failed. Last: ' . $lastError]];
|
||||||
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'success' => false,
|
'success' => true,
|
||||||
'platform_post_id' => '',
|
'platform_post_id' => $event['id'],
|
||||||
'response' => ['error' => 'Nostr WebSocket relay publishing is not yet implemented. This service will be available in a future release.'],
|
'response' => ['event_id' => $event['id'], 'relay' => $relayUrl ?? ''],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function validateCredentials(array $credentials): array
|
public function validateCredentials(array $credentials): array
|
||||||
{
|
{
|
||||||
$privateKey = $credentials['private_key'] ?? '';
|
if (!extension_loaded('gmp')) {
|
||||||
|
return ['valid' => false, 'message' => 'PHP ext-gmp is required for Nostr.', 'account_name' => ''];
|
||||||
|
}
|
||||||
|
|
||||||
|
$privateKey = strtolower(trim($credentials['private_key'] ?? ''));
|
||||||
$relays = $credentials['relays'] ?? '';
|
$relays = $credentials['relays'] ?? '';
|
||||||
|
|
||||||
if (empty($privateKey)) {
|
if (empty($privateKey)) {
|
||||||
return ['valid' => false, 'message' => 'Private key is required.', 'account_name' => ''];
|
return ['valid' => false, 'message' => 'Private key is required.', 'account_name' => ''];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!preg_match('/^[0-9a-f]{64}$/', $privateKey)) {
|
||||||
|
return ['valid' => false, 'message' => 'Private key must be 64 hex characters.', 'account_name' => ''];
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($relays)) {
|
if (empty($relays)) {
|
||||||
return ['valid' => false, 'message' => 'At least one relay URL is required.', 'account_name' => ''];
|
return ['valid' => false, 'message' => 'At least one relay URL is required.', 'account_name' => ''];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate that relay URLs look like WebSocket URLs
|
|
||||||
$relayList = array_filter(array_map('trim', explode(',', $relays)));
|
$relayList = array_filter(array_map('trim', explode(',', $relays)));
|
||||||
$valid = true;
|
|
||||||
|
|
||||||
foreach ($relayList as $relay) {
|
foreach ($relayList as $relay) {
|
||||||
if (!str_starts_with($relay, 'wss://') && !str_starts_with($relay, 'ws://')) {
|
if (!str_starts_with($relay, 'wss://') && !str_starts_with($relay, 'ws://')) {
|
||||||
$valid = false;
|
return ['valid' => false, 'message' => 'Relay URLs must start with wss:// or ws://.', 'account_name' => ''];
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$valid) {
|
$pubkey = $this->getPublicKey($privateKey);
|
||||||
return ['valid' => false, 'message' => 'Relay URLs must start with wss:// or ws://.', 'account_name' => ''];
|
$npub = substr($pubkey, 0, 16) . '...';
|
||||||
}
|
|
||||||
|
|
||||||
return ['valid' => true, 'message' => 'Credentials configured (' . count($relayList) . ' relay(s))', 'account_name' => 'Nostr'];
|
return ['valid' => true, 'message' => count($relayList) . ' relay(s) configured', 'account_name' => 'npub:' . $npub];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSupportedMediaTypes(): array
|
public function getSupportedMediaTypes(): array
|
||||||
{
|
{
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// -- NIP-01 event creation --
|
||||||
|
|
||||||
|
private function createEvent(string $pubkey, string $content, int $kind = 1, array $tags = []): array
|
||||||
|
{
|
||||||
|
$createdAt = time();
|
||||||
|
$serialized = json_encode([0, $pubkey, $createdAt, $kind, $tags, $content], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
||||||
|
$id = hash('sha256', $serialized);
|
||||||
|
|
||||||
|
return [
|
||||||
|
'id' => $id,
|
||||||
|
'pubkey' => $pubkey,
|
||||||
|
'created_at' => $createdAt,
|
||||||
|
'kind' => $kind,
|
||||||
|
'tags' => $tags,
|
||||||
|
'content' => $content,
|
||||||
|
'sig' => '',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// -- WebSocket relay publishing --
|
||||||
|
|
||||||
|
private function publishToRelay(string $relayUrl, array $event): array
|
||||||
|
{
|
||||||
|
$parsed = parse_url($relayUrl);
|
||||||
|
|
||||||
|
if (!$parsed || !isset($parsed['host'])) {
|
||||||
|
return ['success' => false, 'error' => 'Invalid relay URL'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$scheme = $parsed['scheme'] ?? 'wss';
|
||||||
|
$host = $parsed['host'];
|
||||||
|
$port = $parsed['port'] ?? ($scheme === 'wss' ? 443 : 80);
|
||||||
|
$path = $parsed['path'] ?? '/';
|
||||||
|
$useTls = ($scheme === 'wss');
|
||||||
|
|
||||||
|
$address = ($useTls ? 'tls://' : 'tcp://') . $host . ':' . $port;
|
||||||
|
$context = stream_context_create(['ssl' => ['verify_peer' => true, 'verify_peer_name' => true]]);
|
||||||
|
|
||||||
|
$socket = @stream_socket_client($address, $errno, $errstr, 10, STREAM_CLIENT_CONNECT, $context);
|
||||||
|
|
||||||
|
if (!$socket) {
|
||||||
|
return ['success' => false, 'error' => "Connection failed: {$errstr} ({$errno})"];
|
||||||
|
}
|
||||||
|
|
||||||
|
stream_set_timeout($socket, 10);
|
||||||
|
|
||||||
|
// WebSocket upgrade handshake
|
||||||
|
$wsKey = base64_encode(random_bytes(16));
|
||||||
|
$handshake = "GET {$path} HTTP/1.1\r\n"
|
||||||
|
. "Host: {$host}\r\n"
|
||||||
|
. "Upgrade: websocket\r\n"
|
||||||
|
. "Connection: Upgrade\r\n"
|
||||||
|
. "Sec-WebSocket-Key: {$wsKey}\r\n"
|
||||||
|
. "Sec-WebSocket-Version: 13\r\n"
|
||||||
|
. "\r\n";
|
||||||
|
|
||||||
|
fwrite($socket, $handshake);
|
||||||
|
|
||||||
|
$response = '';
|
||||||
|
|
||||||
|
while (($line = fgets($socket)) !== false) {
|
||||||
|
$response .= $line;
|
||||||
|
|
||||||
|
if (trim($line) === '') {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strpos($response, '101') === false) {
|
||||||
|
fclose($socket);
|
||||||
|
|
||||||
|
return ['success' => false, 'error' => 'WebSocket upgrade failed'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send EVENT message
|
||||||
|
$payload = json_encode(['EVENT', $event], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
||||||
|
$this->wsWrite($socket, $payload);
|
||||||
|
|
||||||
|
// Read OK response (with timeout)
|
||||||
|
$reply = $this->wsRead($socket);
|
||||||
|
fclose($socket);
|
||||||
|
|
||||||
|
if ($reply === null) {
|
||||||
|
return ['success' => false, 'error' => 'No response from relay'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$decoded = json_decode($reply, true);
|
||||||
|
|
||||||
|
if (!is_array($decoded) || ($decoded[0] ?? '') !== 'OK') {
|
||||||
|
$msg = is_array($decoded) ? ($decoded[3] ?? $decoded[2] ?? 'Unknown error') : 'Invalid response';
|
||||||
|
|
||||||
|
return ['success' => false, 'error' => (string) $msg];
|
||||||
|
}
|
||||||
|
|
||||||
|
// ["OK", event_id, true/false, message]
|
||||||
|
$accepted = $decoded[2] ?? false;
|
||||||
|
|
||||||
|
if (!$accepted) {
|
||||||
|
return ['success' => false, 'error' => $decoded[3] ?? 'Relay rejected event'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return ['success' => true, 'error' => ''];
|
||||||
|
}
|
||||||
|
|
||||||
|
private function wsWrite($socket, string $data): void
|
||||||
|
{
|
||||||
|
$len = strlen($data);
|
||||||
|
$frame = chr(0x81); // text frame, FIN bit set
|
||||||
|
$mask = random_bytes(4);
|
||||||
|
|
||||||
|
if ($len < 126) {
|
||||||
|
$frame .= chr($len | 0x80); // mask bit set
|
||||||
|
} elseif ($len < 65536) {
|
||||||
|
$frame .= chr(126 | 0x80) . pack('n', $len);
|
||||||
|
} else {
|
||||||
|
$frame .= chr(127 | 0x80) . pack('J', $len);
|
||||||
|
}
|
||||||
|
|
||||||
|
$frame .= $mask;
|
||||||
|
|
||||||
|
for ($i = 0; $i < $len; $i++) {
|
||||||
|
$frame .= $data[$i] ^ $mask[$i % 4];
|
||||||
|
}
|
||||||
|
|
||||||
|
fwrite($socket, $frame);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function wsRead($socket): ?string
|
||||||
|
{
|
||||||
|
$header = fread($socket, 2);
|
||||||
|
|
||||||
|
if ($header === false || strlen($header) < 2) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = ord($header[1]) & 0x7F;
|
||||||
|
|
||||||
|
if ($len === 126) {
|
||||||
|
$ext = fread($socket, 2);
|
||||||
|
$len = unpack('n', $ext)[1];
|
||||||
|
} elseif ($len === 127) {
|
||||||
|
$ext = fread($socket, 8);
|
||||||
|
$len = unpack('J', $ext)[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
$masked = (ord($header[1]) & 0x80) !== 0;
|
||||||
|
$mask = $masked ? fread($socket, 4) : '';
|
||||||
|
$data = '';
|
||||||
|
|
||||||
|
while (strlen($data) < $len) {
|
||||||
|
$chunk = fread($socket, $len - strlen($data));
|
||||||
|
|
||||||
|
if ($chunk === false) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data .= $chunk;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($masked) {
|
||||||
|
for ($i = 0; $i < strlen($data); $i++) {
|
||||||
|
$data[$i] = $data[$i] ^ $mask[$i % 4];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
// -- BIP-340 Schnorr signature over secp256k1 --
|
||||||
|
|
||||||
|
private function getPublicKey(string $privateKeyHex): string
|
||||||
|
{
|
||||||
|
$d = gmp_init($privateKeyHex, 16);
|
||||||
|
$G = [gmp_init(self::SECP256K1_GX, 16), gmp_init(self::SECP256K1_GY, 16)];
|
||||||
|
|
||||||
|
$point = $this->ecMultiply($G, $d);
|
||||||
|
|
||||||
|
return str_pad(gmp_strval($point[0], 16), 64, '0', STR_PAD_LEFT);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function schnorrSign(string $messageHex, string $privateKeyHex): string
|
||||||
|
{
|
||||||
|
$p = gmp_init(self::SECP256K1_P, 16);
|
||||||
|
$n = gmp_init(self::SECP256K1_N, 16);
|
||||||
|
$G = [gmp_init(self::SECP256K1_GX, 16), gmp_init(self::SECP256K1_GY, 16)];
|
||||||
|
|
||||||
|
$d = gmp_init($privateKeyHex, 16);
|
||||||
|
$P = $this->ecMultiply($G, $d);
|
||||||
|
$px = str_pad(gmp_strval($P[0], 16), 64, '0', STR_PAD_LEFT);
|
||||||
|
|
||||||
|
// BIP-340: if P.y is odd, negate d
|
||||||
|
if (gmp_testbit($P[1], 0)) {
|
||||||
|
$d = gmp_sub($n, $d);
|
||||||
|
}
|
||||||
|
|
||||||
|
$dBytes = hex2bin(str_pad(gmp_strval($d, 16), 64, '0', STR_PAD_LEFT));
|
||||||
|
$auxRand = random_bytes(32);
|
||||||
|
$t = $dBytes ^ $this->taggedHash('BIP0340/aux', $auxRand);
|
||||||
|
$pxBytes = hex2bin($px);
|
||||||
|
$msgBytes = hex2bin($messageHex);
|
||||||
|
|
||||||
|
$rand = $this->taggedHash('BIP0340/nonce', $t . $pxBytes . $msgBytes);
|
||||||
|
$k0 = gmp_mod(gmp_init(bin2hex($rand), 16), $n);
|
||||||
|
|
||||||
|
if (gmp_cmp($k0, 0) === 0) {
|
||||||
|
return str_repeat('00', 64);
|
||||||
|
}
|
||||||
|
|
||||||
|
$R = $this->ecMultiply($G, $k0);
|
||||||
|
$k = gmp_testbit($R[1], 0) ? gmp_sub($n, $k0) : $k0;
|
||||||
|
|
||||||
|
$rx = str_pad(gmp_strval($R[0], 16), 64, '0', STR_PAD_LEFT);
|
||||||
|
$rxBytes = hex2bin($rx);
|
||||||
|
|
||||||
|
$eHash = $this->taggedHash('BIP0340/challenge', $rxBytes . $pxBytes . $msgBytes);
|
||||||
|
$e = gmp_mod(gmp_init(bin2hex($eHash), 16), $n);
|
||||||
|
|
||||||
|
$s = gmp_mod(gmp_add($k, gmp_mul($e, $d)), $n);
|
||||||
|
|
||||||
|
return $rx . str_pad(gmp_strval($s, 16), 64, '0', STR_PAD_LEFT);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function taggedHash(string $tag, string $data): string
|
||||||
|
{
|
||||||
|
$tagHash = hash('sha256', $tag, true);
|
||||||
|
|
||||||
|
return hash('sha256', $tagHash . $tagHash . $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// -- secp256k1 elliptic curve arithmetic --
|
||||||
|
|
||||||
|
private function ecMultiply(array $point, \GMP $scalar): array
|
||||||
|
{
|
||||||
|
$result = null;
|
||||||
|
$addend = $point;
|
||||||
|
$n = gmp_init(self::SECP256K1_N, 16);
|
||||||
|
|
||||||
|
$scalar = gmp_mod($scalar, $n);
|
||||||
|
|
||||||
|
while (gmp_cmp($scalar, 0) > 0) {
|
||||||
|
if (gmp_testbit($scalar, 0)) {
|
||||||
|
$result = $result === null ? $addend : $this->ecAdd($result, $addend);
|
||||||
|
}
|
||||||
|
|
||||||
|
$addend = $this->ecDouble($addend);
|
||||||
|
$scalar = gmp_div_q($scalar, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function ecAdd(array $p1, array $p2): array
|
||||||
|
{
|
||||||
|
$prime = gmp_init(self::SECP256K1_P, 16);
|
||||||
|
|
||||||
|
if (gmp_cmp($p1[0], $p2[0]) === 0 && gmp_cmp($p1[1], $p2[1]) === 0) {
|
||||||
|
return $this->ecDouble($p1);
|
||||||
|
}
|
||||||
|
|
||||||
|
$dx = gmp_mod(gmp_sub($p2[0], $p1[0]), $prime);
|
||||||
|
|
||||||
|
if (gmp_cmp($dx, 0) < 0) {
|
||||||
|
$dx = gmp_add($dx, $prime);
|
||||||
|
}
|
||||||
|
|
||||||
|
$dy = gmp_mod(gmp_sub($p2[1], $p1[1]), $prime);
|
||||||
|
|
||||||
|
if (gmp_cmp($dy, 0) < 0) {
|
||||||
|
$dy = gmp_add($dy, $prime);
|
||||||
|
}
|
||||||
|
|
||||||
|
$slope = gmp_mod(gmp_mul($dy, gmp_invert($dx, $prime)), $prime);
|
||||||
|
$x3 = gmp_mod(gmp_sub(gmp_sub(gmp_mul($slope, $slope), $p1[0]), $p2[0]), $prime);
|
||||||
|
$y3 = gmp_mod(gmp_sub(gmp_mul($slope, gmp_sub($p1[0], $x3)), $p1[1]), $prime);
|
||||||
|
|
||||||
|
if (gmp_cmp($x3, 0) < 0) {
|
||||||
|
$x3 = gmp_add($x3, $prime);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gmp_cmp($y3, 0) < 0) {
|
||||||
|
$y3 = gmp_add($y3, $prime);
|
||||||
|
}
|
||||||
|
|
||||||
|
return [$x3, $y3];
|
||||||
|
}
|
||||||
|
|
||||||
|
private function ecDouble(array $point): array
|
||||||
|
{
|
||||||
|
$prime = gmp_init(self::SECP256K1_P, 16);
|
||||||
|
|
||||||
|
// secp256k1 has a=0, so slope = 3*x^2 / (2*y)
|
||||||
|
$num = gmp_mod(gmp_mul(3, gmp_mul($point[0], $point[0])), $prime);
|
||||||
|
$denom = gmp_mod(gmp_mul(2, $point[1]), $prime);
|
||||||
|
|
||||||
|
if (gmp_cmp($denom, 0) < 0) {
|
||||||
|
$denom = gmp_add($denom, $prime);
|
||||||
|
}
|
||||||
|
|
||||||
|
$slope = gmp_mod(gmp_mul($num, gmp_invert($denom, $prime)), $prime);
|
||||||
|
$x3 = gmp_mod(gmp_sub(gmp_mul($slope, $slope), gmp_mul(2, $point[0])), $prime);
|
||||||
|
$y3 = gmp_mod(gmp_sub(gmp_mul($slope, gmp_sub($point[0], $x3)), $point[1]), $prime);
|
||||||
|
|
||||||
|
if (gmp_cmp($x3, 0) < 0) {
|
||||||
|
$x3 = gmp_add($x3, $prime);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gmp_cmp($y3, 0) < 0) {
|
||||||
|
$y3 = gmp_add($y3, $prime);
|
||||||
|
}
|
||||||
|
|
||||||
|
return [$x3, $y3];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Ntfy Push Notifications</name>
|
<name>MokoSuiteCross - Ntfy Push Notifications</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Pinterest</name>
|
<name>MokoSuiteCross - Pinterest</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Reddit</name>
|
<name>MokoSuiteCross - Reddit</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - RSS Feed</name>
|
<name>MokoSuiteCross - RSS Feed</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - SendGrid</name>
|
<name>MokoSuiteCross - SendGrid</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Slack</name>
|
<name>MokoSuiteCross - Slack</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Microsoft Teams</name>
|
<name>MokoSuiteCross - Microsoft Teams</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Telegram</name>
|
<name>MokoSuiteCross - Telegram</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Threads (Meta)</name>
|
<name>MokoSuiteCross - Threads (Meta)</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - TikTok</name>
|
<name>MokoSuiteCross - TikTok</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Tumblr</name>
|
<name>MokoSuiteCross - Tumblr</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - X / Twitter</name>
|
<name>MokoSuiteCross - X / Twitter</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Generic Webhook</name>
|
<name>MokoSuiteCross - Generic Webhook</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - WhatsApp Business</name>
|
<name>MokoSuiteCross - WhatsApp Business</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - WordPress</name>
|
<name>MokoSuiteCross - WordPress</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Youtube</name>
|
<name>MokoSuiteCross - Youtube</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-06-23</creationDate>
|
<creationDate>2026-06-23</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="system" method="upgrade">
|
<extension type="plugin" group="system" method="upgrade">
|
||||||
<name>System - MokoSuiteCross</name>
|
<name>System - MokoSuiteCross</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="system" method="upgrade">
|
<extension type="plugin" group="system" method="upgrade">
|
||||||
<name>System - MokoSuiteCross Events</name>
|
<name>System - MokoSuiteCross Events</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="system" method="upgrade">
|
<extension type="plugin" group="system" method="upgrade">
|
||||||
<name>System - MokoSuiteCross Gallery</name>
|
<name>System - MokoSuiteCross Gallery</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="task" method="upgrade">
|
<extension type="plugin" group="task" method="upgrade">
|
||||||
<name>Task - MokoSuiteCross Queue Processor</name>
|
<name>Task - MokoSuiteCross Queue Processor</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="webservices" method="upgrade">
|
<extension type="plugin" group="webservices" method="upgrade">
|
||||||
<name>Web Services - MokoSuiteCross</name>
|
<name>Web Services - MokoSuiteCross</name>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
+2
-2
@@ -35,8 +35,9 @@ class MokoSuiteCrossWebServices extends CMSPlugin implements SubscriberInterface
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onBeforeApiRoute(&$router): void
|
public function onBeforeApiRoute($event): void
|
||||||
{
|
{
|
||||||
|
$router = $event instanceof \Joomla\CMS\Event\AbstractEvent ? $event->getRouter() : $event;
|
||||||
$defaults = ['component' => 'com_mokosuitecross'];
|
$defaults = ['component' => 'com_mokosuitecross'];
|
||||||
|
|
||||||
$router->createCRUDRoutes('v1/mokosuitecross/posts', 'posts', $defaults);
|
$router->createCRUDRoutes('v1/mokosuitecross/posts', 'posts', $defaults);
|
||||||
@@ -44,7 +45,6 @@ class MokoSuiteCrossWebServices extends CMSPlugin implements SubscriberInterface
|
|||||||
$router->createCRUDRoutes('v1/mokosuitecross/templates', 'templates', $defaults);
|
$router->createCRUDRoutes('v1/mokosuitecross/templates', 'templates', $defaults);
|
||||||
$router->createCRUDRoutes('v1/mokosuitecross/logs', 'logs', $defaults);
|
$router->createCRUDRoutes('v1/mokosuitecross/logs', 'logs', $defaults);
|
||||||
|
|
||||||
// Action endpoint: dispatch cross-posts for an article (POST only)
|
|
||||||
$router->addRoute(
|
$router->addRoute(
|
||||||
new \Joomla\Router\Route(['POST'], 'v1/mokosuitecross/dispatch', 'dispatch.dispatch', [], $defaults)
|
new \Joomla\Router\Route(['POST'], 'v1/mokosuitecross/dispatch', 'dispatch.dispatch', [], $defaults)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<extension type="package" method="upgrade">
|
<extension type="package" method="upgrade">
|
||||||
<name>MokoSuiteCross</name>
|
<name>MokoSuiteCross</name>
|
||||||
<packagename>mokosuitecross</packagename>
|
<packagename>mokosuitecross</packagename>
|
||||||
<version>01.07.00</version>
|
<version>01.08.12</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
Reference in New Issue
Block a user