main #2

Merged
carrydela merged 3 commits from zuimao_kaf/mygoTgChanBot:main into main 2026-03-18 10:33:17 +08:00
Showing only changes of commit 6686a43a35 - Show all commits

View File

@@ -116,7 +116,7 @@ func (b *Bot) handleTextInput(c tele.Context) error {
state := b.states.Get(c.Sender().ID)
// 私聊收到转发消息,直接启动投稿流程(无需先 /post
if isForwarded && b.cfg.IsAdmin(c.Sender().ID) {
if isForwarded && b.isAdmin(c.Sender().ID) {
if state == nil {
b.states.StartPost(c.Sender().ID)
}
@@ -138,7 +138,7 @@ func (b *Bot) handleTextInput(c tele.Context) error {
}
func (b *Bot) handleForwarded(c tele.Context) error {
if !b.cfg.IsAdmin(c.Sender().ID) {
if !b.isAdmin(c.Sender().ID) {
return nil
}
@@ -270,7 +270,7 @@ func (b *Bot) buildCategoryKeyboard(categories []storage.Category) *tele.ReplyMa
}
func (b *Bot) handleCallback(c tele.Context) error {
if !b.cfg.IsAdmin(c.Sender().ID) {
if !b.isAdmin(c.Sender().ID) {
return c.Respond(&tele.CallbackResponse{Text: "无权限"})
}