|
|
|
@ -24,13 +24,11 @@ graph TD
|
|
|
|
|
H -->|No| J[Process Command]
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Database Enhancements
|
|
|
|
|
### Database Enhancements (DONE)
|
|
|
|
|
- **Users Table Additions**:
|
|
|
|
|
- `first_seen`: Timestamp of first interaction
|
|
|
|
|
- `last_seen`: Timestamp of most recent activity
|
|
|
|
|
- `last_confirmed`: Timestamp of last API verification
|
|
|
|
|
- `active_groups`: JSON array of groups user was seen in
|
|
|
|
|
- `verification_status`: Enum (unverified/verified/flagged)
|
|
|
|
|
|
|
|
|
|
### Periodic Sync Strategy
|
|
|
|
|
1. **Rotating Group Check**:
|
|
|
|
@ -39,7 +37,6 @@ graph TD
|
|
|
|
|
2. **User Reconciliation**:
|
|
|
|
|
- Add newly discovered users
|
|
|
|
|
- Update `last_confirmed` for active users
|
|
|
|
|
- Flag inactive users after N days of no activity
|
|
|
|
|
3. **Optimizations**:
|
|
|
|
|
- Cache active group IDs in memory
|
|
|
|
|
- Batch database writes
|
|
|
|
@ -51,14 +48,3 @@ graph TD
|
|
|
|
|
- Unknown private chats
|
|
|
|
|
- Implement rate limiting
|
|
|
|
|
- Maintain audit logs of verification events
|
|
|
|
|
|
|
|
|
|
### Future Extensibility
|
|
|
|
|
1. **User Profiles**:
|
|
|
|
|
- Store names/profile pictures when available
|
|
|
|
|
- Track interaction history
|
|
|
|
|
2. **Reputation System**:
|
|
|
|
|
- Activity scoring
|
|
|
|
|
- Trust levels
|
|
|
|
|
3. **Notification Preferences**:
|
|
|
|
|
- Per-user settings
|
|
|
|
|
- Do-not-disturb periods
|
|
|
|
|