Skip to content

feat: Telegram Group Management (#65)#441

Open
Susuhome wants to merge 1 commit intoSpectral-Finance:mainfrom
Susuhome:feat/telegram-group-management
Open

feat: Telegram Group Management (#65)#441
Susuhome wants to merge 1 commit intoSpectral-Finance:mainfrom
Susuhome:feat/telegram-group-management

Conversation

@Susuhome
Copy link

@Susuhome Susuhome commented Mar 8, 2026

Overview

Implements complete Telegram group management capabilities for issue #65.

Modules

Prisms

  • ManageGroupMembers: Ban, unban, restrict, promote, kick, get_member with configurable permissions, expiry dates, and admin rights
  • ManageGroupSettings: Set title, description, default permissions, slow mode delay, pin/unpin messages, get chat info
  • ContentModeration: Spam detection (7 regex patterns + caps/link analysis), content rule validation (forbidden words, no_links, max_length), auto-moderate with severity levels (none → warn → restrict → ban)

Lenses

  • GetGroupAdmins: Retrieve admin list with parsed permission flags
  • GetGroupMemberCount: Get group member count

Infrastructure

  • AdminLogger: ETS-backed audit log for admin actions with query by action/chat/admin/target, auto-eviction, optional disk persistence

Guide

  • guides/telegram_group_management.md — full usage guide with examples

Acceptance Criteria

  • Complete group management prisms (ManageGroupMembers, ManageGroupSettings)
  • Permission system implementation (ChatPermissions in restrict, admin_rights in promote)
  • Moderation action handlers (ContentModeration with spam detection + auto-moderate)
  • Admin logging system (AdminLogger with ETS + persistence)
  • Documentation and examples (guide + moduledocs)
  • Test coverage > 90% (31 tests, all passing)
  • Performance optimization (ETS for O(1) lookups, auto-eviction)

Tests

31 tests covering all modules:

  • ManageGroupMembers: 6 tests (ban, unban, restrict, promote, kick, get_member)
  • ManageGroupSettings: 7 tests (set_title, set_description, set_permissions, set_slow_mode, pin, unpin_all, get_chat)
  • ContentModeration: 11 tests (spam detection, clean text, excessive caps, forbidden words, no_links, max_length, compliant, delete, bulk delete, auto-moderate spam, auto-moderate clean)
  • AdminLogger: 5 tests (log/query, filter by action, filter by chat, recent ordering, clear)
  • GetGroupAdmins: 1 test
  • GetGroupMemberCount: 1 test

Budget: $1,800

Implements complete group management for Telegram:

## Prisms
- ManageGroupMembers: ban, unban, restrict, promote, kick, get_member
- ManageGroupSettings: set_title, set_description, set_permissions, set_slow_mode, pin/unpin messages, get_chat
- ContentModeration: spam detection (7 patterns), content rules (forbidden words, no_links, max_length), auto_moderate with severity levels

## Lenses
- GetGroupAdmins: retrieve admin list with permissions
- GetGroupMemberCount: get member count

## Infrastructure
- AdminLogger: ETS-backed audit log with query by action/chat/admin/target, eviction, persistence

## Guide
- guides/telegram_group_management.md

31 tests, all passing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant