mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-17 16:56:38 +08:00
opt: replace proxy url for discord image url
This commit is contained in:
parent
e391bfca80
commit
99cb48ce88
@ -155,10 +155,11 @@ func (s *Service) Notify(data CBReq) {
|
||||
job.Progress = data.Progress
|
||||
job.Prompt = data.Prompt
|
||||
job.Hash = data.Image.Hash
|
||||
job.OrgURL = data.Image.URL
|
||||
if s.client.Config.UseCDN {
|
||||
job.UseProxy = true
|
||||
job.ImgURL = strings.ReplaceAll(data.Image.URL, "https://cdn.discordapp.com", s.client.Config.ImgCdnURL)
|
||||
job.OrgURL = strings.ReplaceAll(data.Image.URL, "https://cdn.discordapp.com", s.client.Config.ImgCdnURL)
|
||||
} else {
|
||||
job.OrgURL = data.Image.URL
|
||||
}
|
||||
|
||||
res = s.db.Updates(&job)
|
||||
|
Loading…
Reference in New Issue
Block a user