- Configurable tier-based Auto Play with a saved user toggle.
Admin tier assignment without payment via Users > Edit > Tier Override. Fixed live group membership refresh, polling, unread indicators, and incoming voice clip population. Added asset cache busting so clients receive the fixes immediately.
This commit is contained in:
@@ -27,7 +27,7 @@ function handleAdminPlatformAction(string $action): ?string {
|
||||
$db = getDB();
|
||||
$plans = $_POST['plans'] ?? [];
|
||||
$boolFeatures = [
|
||||
'voice_messages', 'recording_status', 'auto_voice_send', 'username_color',
|
||||
'voice_messages', 'recording_status', 'auto_voice_send', 'auto_voice_play', 'username_color',
|
||||
'text_export', 'voice_archive', 'voice_export', 'email_2fa',
|
||||
];
|
||||
$db->beginTransaction();
|
||||
@@ -81,6 +81,7 @@ function handleAdminPlatformAction(string $action): ?string {
|
||||
$id = (int)$db->lastInsertId();
|
||||
$features = [
|
||||
'voice_messages' => true, 'recording_status' => false, 'auto_voice_send' => false,
|
||||
'auto_voice_play' => false,
|
||||
'group_member_limit' => 2, 'username_color' => false, 'text_archive_days' => 30,
|
||||
'text_export' => true, 'voice_archive' => false, 'voice_export' => false, 'email_2fa' => false,
|
||||
];
|
||||
@@ -106,8 +107,8 @@ function renderAdminPlatformTab(): void {
|
||||
$plans = plans(false);
|
||||
$db = getDB();
|
||||
$subscribers = $db->query("SELECT u.id,u.username,u.email,u.email_verified_at,u.subscription_status,
|
||||
u.subscription_period_end,u.cancel_at_period_end,p.name AS plan_name,u.stripe_customer_id
|
||||
FROM users u LEFT JOIN plans p ON p.id=u.plan_id
|
||||
u.subscription_period_end,u.cancel_at_period_end,p.name AS plan_name,u.stripe_customer_id,u.manual_plan_id
|
||||
FROM users u LEFT JOIN plans p ON p.id=COALESCE(u.manual_plan_id,u.plan_id)
|
||||
ORDER BY (u.subscription_status IN ('active','trialing','past_due')) DESC,u.created_at DESC LIMIT 500")->fetchAll();
|
||||
$stats = [
|
||||
'visits_24h' => (int)$db->query("SELECT COUNT(*) FROM visitor_events WHERE event_type='visit' AND created_at>" . (time() - 86400))->fetchColumn(),
|
||||
@@ -118,7 +119,7 @@ function renderAdminPlatformTab(): void {
|
||||
$events = $db->query("SELECT event_type,COUNT(*) AS total FROM visitor_events
|
||||
WHERE created_at>" . (time() - 2592000) . " GROUP BY event_type ORDER BY total DESC")->fetchAll();
|
||||
$featureKeys = [
|
||||
'voice_messages', 'recording_status', 'auto_voice_send', 'group_member_limit',
|
||||
'voice_messages', 'recording_status', 'auto_voice_send', 'auto_voice_play', 'group_member_limit',
|
||||
'username_color', 'text_archive_days', 'text_export', 'voice_archive',
|
||||
'voice_export', 'email_2fa',
|
||||
];
|
||||
@@ -225,7 +226,7 @@ function renderAdminPlatformTab(): void {
|
||||
<?php foreach ($subscribers as $subscriber): ?><tr>
|
||||
<td><?= esc($subscriber['username']) ?></td>
|
||||
<td class="dim"><?= esc($subscriber['email'] ?: 'not set') ?> <?= $subscriber['email_verified_at'] ? '<span class="badge badge-g">VERIFIED</span>' : '' ?></td>
|
||||
<td><?= esc($subscriber['plan_name'] ?: 'Free') ?></td>
|
||||
<td><?= esc($subscriber['plan_name'] ?: 'Free') ?><?= $subscriber['manual_plan_id'] ? ' <span class="badge badge-o">ADMIN</span>' : '' ?></td>
|
||||
<td><span class="badge <?= in_array($subscriber['subscription_status'], ['active','trialing'], true) ? 'badge-g' : 'badge-o' ?>"><?= esc(strtoupper($subscriber['subscription_status'])) ?></span></td>
|
||||
<td class="dim"><?= $subscriber['subscription_period_end'] ? esc(fmtTime((int)$subscriber['subscription_period_end'])) : '-' ?><?= $subscriber['cancel_at_period_end'] ? ' / CANCELING' : '' ?></td>
|
||||
<td class="dim"><?= esc($subscriber['stripe_customer_id'] ?: '-') ?></td>
|
||||
|
||||
Reference in New Issue
Block a user