mirror of
https://github.com/idanoo/autobrr
synced 2025-07-24 01:09:13 +00:00
feat(notification): Telegram add support for topics in groups (#894)
* feat(notification): send Telegram messages to a specific topic of a group * Convert settings.Topic to integer once and reuse it as part of the telegramSender struct. * feat(notifications): add migrations for topic * fix(notifications): find null string * fix(notifications): form initial values --------- Co-authored-by: ze0s <ze0s@riseup.net>
This commit is contained in:
parent
e5692fefc7
commit
fdc957c571
7 changed files with 60 additions and 16 deletions
|
@ -121,6 +121,11 @@ function FormFieldsTelegram() {
|
|||
label="Chat ID"
|
||||
help="Chat ID"
|
||||
/>
|
||||
<PasswordFieldWide
|
||||
name="topic"
|
||||
label="Message Thread ID"
|
||||
help="Message Thread (topic) of a Supergroup"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -436,6 +441,7 @@ interface InitialValues {
|
|||
api_key?: string;
|
||||
priority?: number;
|
||||
channel?: string;
|
||||
topic?: string;
|
||||
events: NotificationEvent[];
|
||||
}
|
||||
|
||||
|
@ -484,6 +490,7 @@ export function NotificationUpdateForm({ isOpen, toggle, notification }: UpdateP
|
|||
api_key: notification.api_key,
|
||||
priority: notification.priority,
|
||||
channel: notification.channel,
|
||||
topic: notification.topic,
|
||||
events: notification.events || []
|
||||
};
|
||||
|
||||
|
@ -567,4 +574,4 @@ export function NotificationUpdateForm({ isOpen, toggle, notification }: UpdateP
|
|||
)}
|
||||
</SlideOver>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue