Add unit tests and improve handling in socketapi package
Introduced comprehensive test coverage for `socketapi` functions, including `handleEvent` and `handleReq` logic. Enhanced `publisher` and `handleEvent` to ensure better filter and event validation, and made minor bug fixes to public key matching logic.
This commit is contained in:
@@ -232,7 +232,7 @@ func (a *A) ProcessDelete(c context.T, target *event.T, env *eventenvelope.Submi
|
||||
}
|
||||
skip = true
|
||||
}
|
||||
if !bytes.Equal(target.Pubkey, env.Pubkey) {
|
||||
if !bytes.Equal(target.Pubkey, env.T.Pubkey) {
|
||||
if err = Ok.Error(a, env, "only author can delete event"); chk.E(err) {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user