We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef3dab1 commit bc3f2d0Copy full SHA for bc3f2d0
main.go
@@ -22,9 +22,13 @@ func main() {
22
fmt.Println("from", from)
23
24
from = strings.ReplaceAll(from, "\\", "/")
25
- fromParts := strings.Split(from, "/")
26
- wxid := fromParts[len(fromParts)-3]
+ fromPaths := strings.Split(from, "/")
27
+ var wxid string
28
+ wxidIndex := len(fromPaths) - 3
29
+ if wxidIndex >= 0 {
30
+ wxid = fromPaths[wxidIndex]
31
+ }
32
needDecrypt := strings.HasPrefix(wxid, "wx")
33
if needDecrypt {
34
fmt.Println("wxid", wxid)
0 commit comments