Commit graph

15 commits

Author SHA1 Message Date
09e3406847 Support personal profile LinkedIn posting
- OAuth callback fetches /v2/userinfo to store member_id + name,
  auto-creates a 'profile' personal page on first connect
- Page modal adds type selector (personal/org), hides org ID for personal
- renderLinkedinPages shows 'Personal' badge instead of org ID
- botconfig saves type field; personal pages omit organization_id

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 13:25:19 +03:00
9b5bf89d11 Switch LinkedIn scope to w_member_social (personal profile)
w_organization_social requires Marketing Developer Platform approval.
Org page scope kept as a comment for when/if that access is granted.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 12:56:49 +03:00
ac5b82c381 Load config.local.php from repo root for server-side secrets
Provides a gitignored override file for credentials like LinkedIn OAuth
keys, avoiding reliance on Apache SetEnv / PHP-FPM env config.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 12:40:14 +03:00
e1f7fb14fc Simplify deploy.sh to run in place on the server
Removes local/prod cases — script now just does git pull, writes BUILD,
and runs migrate wherever it's executed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 12:32:28 +03:00
e8e4476a58 Fall back to \$_SERVER for LinkedIn env vars to support PHP-FPM
Apache SetEnv doesn't reach PHP-FPM processes via getenv(), but the
values are still available in \$_SERVER.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 12:22:16 +03:00
f6e768c246 Expand bot/automated-tool filter in site log importer
Add empty UA early return and a comprehensive list of bot signals covering
HTTP libraries, SEO platforms, uptime monitors, security scanners, AI
crawlers, and generic scanner vocabulary.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 19:29:29 +03:00
dfca6df629 Send Discord snowflake IDs as strings to prevent JS precision loss
channel_id and role_id are 64-bit integers that exceed Number.MAX_SAFE_INTEGER,
causing silent rounding in the browser. Cast to string in the GET response;
PHP stores them back as integers on save (64-bit PHP handles them correctly).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 19:29:23 +03:00
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