Add user and channel access controls to Telegram bot

Introduces configuration options to restrict Telegram bot access to specific user and channel IDs. Updates ApplicationProperties, TelegramPipelineBot, and settings.yml.template to support allow lists and enable/disable flags for user and channel access control.
This commit is contained in:
Ludy87
2025-12-09 10:40:50 +01:00
parent fbdd640eef
commit 0bca358838
3 changed files with 105 additions and 2 deletions

View File

@@ -548,6 +548,7 @@ public class ApplicationProperties {
private boolean ssoAutoLogin;
private CustomMetadata customMetadata = new CustomMetadata();
@Deprecated
@Data
public static class CustomMetadata {
private boolean autoUpdateMetadata;
@@ -583,6 +584,11 @@ public class ApplicationProperties {
private String botToken;
private String botUsername;
private String pipelineInboxFolder = "telegram";
private Boolean customFolderSubfix = false;
private Boolean enableAllowUserIDs = false;
private List<Long> allowUserIDs = new ArrayList<>();
private Boolean enableAllowChannelIDs = false;
private List<Long> allowChannelIDs = new ArrayList<>();
private long processingTimeoutSeconds = 180;
private long pollingIntervalMillis = 2000;
}