Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
go-cqhttp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
go-cqhttp
Commits
828ca2ec
Commit
828ca2ec
authored
Sep 06, 2020
by
scjtqs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 ios 支持
parent
514f93b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
coolq/cqcode.go
coolq/cqcode.go
+4
-4
No files found.
coolq/cqcode.go
View file @
828ca2ec
...
...
@@ -604,7 +604,7 @@ func (bot *CQBot) SendNewPic(elem message.IMessageElement, source string, icon s
log
.
Warnf
(
"警告: 好友消息 %v 消息图片上传失败: %v"
,
1
,
err
)
return
nil
,
err
}
xml
=
fmt
.
Sprintf
(
`<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><msg serviceID="5" templateID="12345" action="" brief="[分享]我看到一张很赞的图片,分享给你,快来看!" sourceMsgId="0" url="%s" flag="0" adverSign="0" multiMsgFlag="0"><item layout="0" advertiser_id="0" aid="0"><image uuid="%
s" md5="%x" GroupFiledid="0" filesize="%d" local_path="%s" minWidth="%d" minHeight="%d" maxWidth="%d" maxHeight="%d" /></item><source name="%s" icon="%s" action="" appid="-1" /></msg>`
,
""
,
gm
.
ImageId
,
gm
.
Md5
,
len
(
i
.
Data
),
""
,
minwidth
,
minheigt
,
maxwidth
,
maxheight
,
source
,
icon
)
xml
=
fmt
.
Sprintf
(
`<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><msg serviceID="5" templateID="12345" action="" brief="[分享]我看到一张很赞的图片,分享给你,快来看!" sourceMsgId="0" url="%s" flag="0" adverSign="0" multiMsgFlag="0"><item layout="0" advertiser_id="0" aid="0"><image uuid="%
x" md5="%x" GroupFiledid="0" filesize="%d" local_path="%s" minWidth="%d" minHeight="%d" maxWidth="%d" maxHeight="%d" /></item><source name="%s" icon="%s" action="" appid="-1" /></msg>`
,
""
,
gm
.
Md5
,
gm
.
Md5
,
len
(
i
.
Data
),
""
,
minwidth
,
minheigt
,
maxwidth
,
maxheight
,
source
,
icon
)
}
else
{
gm
,
err
:=
bot
.
Client
.
UploadGroupImage
(
1
,
i
.
Data
)
...
...
@@ -612,14 +612,14 @@ func (bot *CQBot) SendNewPic(elem message.IMessageElement, source string, icon s
log
.
Warnf
(
"警告: 群 %v 消息图片上传失败: %v"
,
1
,
err
)
return
nil
,
err
}
xml
=
fmt
.
Sprintf
(
`<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><msg serviceID="5" templateID="12345" action="" brief="[分享]我看到一张很赞的图片,分享给你,快来看!" sourceMsgId="0" url="%s" flag="0" adverSign="0" multiMsgFlag="0"><item layout="0" advertiser_id="0" aid="0"><image uuid="%
s" md5="%x" GroupFiledid="0" filesize="%d" local_path="%s" minWidth="%d" minHeight="%d" maxWidth="%d" maxHeight="%d" /></item><source name="%s" icon="%s" action="" appid="-1" /></msg>`
,
""
,
gm
.
ImageId
,
gm
.
Md5
,
len
(
i
.
Data
),
""
,
minwidth
,
minheigt
,
maxwidth
,
maxheight
,
source
,
icon
)
xml
=
fmt
.
Sprintf
(
`<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><msg serviceID="5" templateID="12345" action="" brief="[分享]我看到一张很赞的图片,分享给你,快来看!" sourceMsgId="0" url="%s" flag="0" adverSign="0" multiMsgFlag="0"><item layout="0" advertiser_id="0" aid="0"><image uuid="%
x" md5="%x" GroupFiledid="0" filesize="%d" local_path="%s" minWidth="%d" minHeight="%d" maxWidth="%d" maxHeight="%d" /></item><source name="%s" icon="%s" action="" appid="-1" /></msg>`
,
""
,
gm
.
Md5
,
gm
.
Md5
,
len
(
i
.
Data
),
""
,
minwidth
,
minheigt
,
maxwidth
,
maxheight
,
source
,
icon
)
}
}
if
i
,
ok
:=
elem
.
(
*
message
.
GroupImageElement
);
ok
{
xml
=
fmt
.
Sprintf
(
`<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><msg serviceID="5" templateID="12345" action="" brief="[分享]我看到一张很赞的图片,分享给你,快来看!" sourceMsgId="0" url="%s" flag="0" adverSign="0" multiMsgFlag="0"><item layout="0" advertiser_id="0" aid="0"><image uuid="%
s" md5="%x" GroupFiledid="0" filesize="%d" local_path="%s" minWidth="%d" minHeight="%d" maxWidth="%d" maxHeight="%d" /></item><source name="%s" icon="%s" action="" appid="-1" /></msg>`
,
""
,
i
.
ImageId
,
i
.
Md5
,
0
,
""
,
minwidth
,
minheigt
,
maxwidth
,
maxheight
,
source
,
icon
)
xml
=
fmt
.
Sprintf
(
`<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><msg serviceID="5" templateID="12345" action="" brief="[分享]我看到一张很赞的图片,分享给你,快来看!" sourceMsgId="0" url="%s" flag="0" adverSign="0" multiMsgFlag="0"><item layout="0" advertiser_id="0" aid="0"><image uuid="%
x" md5="%x" GroupFiledid="0" filesize="%d" local_path="%s" minWidth="%d" minHeight="%d" maxWidth="%d" maxHeight="%d" /></item><source name="%s" icon="%s" action="" appid="-1" /></msg>`
,
""
,
i
.
Md5
,
i
.
Md5
,
0
,
""
,
minwidth
,
minheigt
,
maxwidth
,
maxheight
,
source
,
icon
)
}
if
i
,
ok
:=
elem
.
(
*
message
.
FriendImageElement
);
ok
{
xml
=
fmt
.
Sprintf
(
`<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><msg serviceID="5" templateID="12345" action="" brief="[分享]我看到一张很赞的图片,分享给你,快来看!" sourceMsgId="0" url="%s" flag="0" adverSign="0" multiMsgFlag="0"><item layout="0" advertiser_id="0" aid="0"><image uuid="%
s" md5="%x" GroupFiledid="0" filesize="%d" local_path="%s" minWidth="%d" minHeight="%d" maxWidth="%d" maxHeight="%d" /></item><source name="%s" icon="%s" action="" appid="-1" /></msg>`
,
""
,
i
.
ImageId
,
i
.
Md5
,
0
,
""
,
minwidth
,
minheigt
,
maxwidth
,
maxheight
,
source
,
icon
)
xml
=
fmt
.
Sprintf
(
`<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><msg serviceID="5" templateID="12345" action="" brief="[分享]我看到一张很赞的图片,分享给你,快来看!" sourceMsgId="0" url="%s" flag="0" adverSign="0" multiMsgFlag="0"><item layout="0" advertiser_id="0" aid="0"><image uuid="%
x" md5="%x" GroupFiledid="0" filesize="%d" local_path="%s" minWidth="%d" minHeight="%d" maxWidth="%d" maxHeight="%d" /></item><source name="%s" icon="%s" action="" appid="-1" /></msg>`
,
""
,
i
.
Md5
,
i
.
Md5
,
0
,
""
,
minwidth
,
minheigt
,
maxwidth
,
maxheight
,
source
,
icon
)
}
if
xml
!=
""
{
log
.
Warn
(
xml
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment