Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuweiyou committed Jul 30, 2023
1 parent ef3dab1 commit bc3f2d0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ func main() {
fmt.Println("from", from)

from = strings.ReplaceAll(from, "\\", "/")
fromParts := strings.Split(from, "/")
wxid := fromParts[len(fromParts)-3]
fromPaths := strings.Split(from, "/")

var wxid string
wxidIndex := len(fromPaths) - 3
if wxidIndex >= 0 {
wxid = fromPaths[wxidIndex]
}
needDecrypt := strings.HasPrefix(wxid, "wx")
if needDecrypt {
fmt.Println("wxid", wxid)
Expand Down

0 comments on commit bc3f2d0

Please sign in to comment.