chat.go 382 B

12345678910111213141516171819202122
  1. package public
  2. import (
  3. "strings"
  4. "github.com/eryajf/chatgpt-dingtalk/pkg/dingbot"
  5. )
  6. func FirstCheck(rmsg *dingbot.ReceiveMsg) bool {
  7. lc := UserService.GetUserMode(rmsg.GetSenderIdentifier())
  8. if lc == "" {
  9. if Config.DefaultMode == "串聊" {
  10. return true
  11. } else {
  12. return false
  13. }
  14. }
  15. if lc != "" && strings.Contains(lc, "串聊") {
  16. return true
  17. }
  18. return false
  19. }