Commit graph

8 commits

Author SHA1 Message Date
df11e32e70 Fix write_config silently swallowing errors in botcompose
Matches the pattern in botconfig.php — returns bool and reports
failure to the caller so the UI shows the real error instead of
false success.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 11:21:43 +03:00
f86859695a Add compose/repost UI for RSS feeds, Mastodon accounts, and LinkedIn pages
- botcompose.php: new API endpoint for rss_repost, mastodon_post, linkedin_post
- _tab_botconfig.php: shared compose modal (textarea + post button)
- app.js: repost button on RSS cards (clears last_id, bot reposts on next poll),
  compose button on Mastodon/LinkedIn cards (direct post via compose modal),
  audit feed labels/icons for new compose actions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 19:07:45 +03:00
158a5b0775 Add LinkedIn OAuth flow
- linkedin_auth API: generates auth URL with CSRF state stored in session
- linkedin_callback: exchanges code for tokens, writes to project's config.json
- index.php: route /linkedin/callback before auth check
- Connect button wired up in JS; reads LINKEDIN_CLIENT_ID/SECRET from server env

Server setup required:
  SetEnv LINKEDIN_CLIENT_ID ...
  SetEnv LINKEDIN_CLIENT_SECRET ...
Redirect URI to register in LinkedIn app: https://<host>/linkedin/callback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 17:25:38 +03:00
3d7b620b6c Point botconfig and botlogs to data/ subdirectory
Matches bashyBot's new data/ layout for safe www-data write access.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 17:19:17 +03:00
796bc15302 Remove sudo from read-only systemctl calls in botcontrol
is-active and show work without sudo as www-data; only
start/stop/restart need elevated privileges.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 16:13:21 +03:00
bf3ae2351d Add Discord Bot project type with process control, config editor, and log viewer
- DiscordBotProject: new project type (discord-bot), auto-detects from main.py + cogs/
- botcontrol API: start/stop/restart/status via sudo systemctl
- botconfig API: atomic read/write of config.json; CRUD for streamers, RSS feeds,
  Mastodon accounts, and LinkedIn pages; tokens masked in GET responses
- botlogs API: tail log file (path via project_settings.bot_log_file)
- Tab partials: _tab_bot (process control), _tab_botconfig (structured editor),
  _tab_logs (log viewer with auto-refresh)
- view.php: register bot/botconfig/logs tabs with labels, icons, and groups
- app.js: bot control panel, config editor with account/page dropdowns in RSS modal,
  Mastodon accounts CRUD, LinkedIn pages CRUD; audit labels/icons for all new actions
- CLAUDE.md: document Discord Bot integration, sudoers requirement, API actions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 14:39:17 +03:00
a2a1f356ba Update of draft system 2026-05-03 23:20:46 +03:00
60ca58f5ba Init 2026-05-03 20:56:15 +03:00