Skip to content

Commit

Permalink
fix: get local data when from is exactly local node
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn-Huang-Tron committed May 29, 2024
1 parent 2c47286 commit 9d841cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/commands/encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ var decryptCmd = &cmds.Command{
var readClose io.ReadCloser
cid := r.Arguments[0]
from, ok := r.Options[fromOption].(string)
if ok && strings.TrimSpace(from) != "" {
if ok && strings.TrimSpace(from) != "" && strings.TrimSpace(from) != n.Identity.String() {
peerID, err := peer.Decode(from)
if err != nil {
return err
Expand Down

0 comments on commit 9d841cf

Please sign in to comment.