Skip to content

Commit

Permalink
Update to the telquery feature to properly query when issuers only ha…
Browse files Browse the repository at this point in the history
…ve Agents and not witnesses.

Signed-off-by: pfeairheller <[email protected]>
  • Loading branch information
pfeairheller committed Nov 8, 2023
1 parent 6ab521e commit 0479564
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/keri/app/agenting.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ def msgDo(self, tymth=None, tock=1.0, **opts):

evt = self.msgs.popleft()
pre = evt["pre"]
target = evt["target"]
src = evt["src"]
r = evt["r"]
q = evt["q"]
Expand Down Expand Up @@ -491,7 +492,7 @@ def msgDo(self, tymth=None, tock=1.0, **opts):

self.extend([witer])

msg = hab.query(pre, src=witer.wit, route=r, query=q) # Query for remote pre Event
msg = hab.query(target, src=witer.wit, route=r, query=q) # Query for remote pre Event

kel = forwarding.introduce(hab, witer.wit)
if kel:
Expand Down Expand Up @@ -526,15 +527,15 @@ def query(self, pre, r="logs", sn=0, src=None, hab=None, anchor=None, wits=None,
if anchor is not None:
qry["a"] = anchor

msg = dict(src=src, pre=pre, r=r, q=qry, wits=wits)
msg = dict(src=src, pre=pre, target=pre, r=r, q=qry, wits=wits)
if hab is not None:
msg["hab"] = hab

self.msgs.append(msg)

def telquery(self, ri, src=None, i=None, r="tels", hab=None, wits=None, **kwa):
def telquery(self, ri, src=None, i=None, r="tels", hab=None, pre=None, wits=None, **kwa):
qry = dict(ri=ri)
msg = dict(src=src, pre=i, r=r, wits=wits, q=qry)
msg = dict(src=src, pre=pre, target=i, r=r, wits=wits, q=qry)
if hab is not None:
msg["hab"] = hab

Expand Down

0 comments on commit 0479564

Please sign in to comment.