File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
protocols_v2/trustping/v1_0 Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,7 @@ async def handle_v2_message(
159159 # send a DCV2 Problem Report here for testing, and to punt procotol handling down
160160 # the road a bit
161161 context = RequestContext (profile )
162+ context .message = message
162163 context .message_receipt = inbound_message .receipt
163164 responder = DispatcherResponder (
164165 context ,
@@ -208,11 +209,10 @@ async def handle_v2_message(
208209 elif context .message :
209210 context .injector .bind_instance (BaseResponder , responder )
210211
211- handler_cls = context .message .Handler
212- handler = handler_cls ().handle
212+ handler = context .message
213213 if self .collector :
214214 handler = self .collector .wrap_coro (handler , [handler .__qualname__ ])
215- await handler (context , responder )
215+ await handler (context , responder , payload = inbound_message . payload )
216216
217217 async def make_v2_message (self , profile : Profile , parsed_msg : dict ) -> BaseMessage :
218218 """Deserialize a message dict into the appropriate message instance.
Original file line number Diff line number Diff line change 1010# Message types
1111PING = "trust_ping/1.0/ping"
1212PING_RESPONSE = "trust_ping/1.0/ping_response"
13+ DEBUG = "https://didcomm.org/basicmessage/2.0/message"
1314
1415PROTOCOL_PACKAGE = "acapy_agent.protocols.trustping.v1_0"
1516
17+ def test_func (context , responder , payload ):
18+ message = payload
19+ print (message )
20+
21+ HANDLERS = {
22+ DEBUG : f"{ PROTOCOL_PACKAGE } .message_types.test_func" ,
23+ }
24+
1625MESSAGE_TYPES = DIDCommPrefix .qualify_all (
1726 {
1827 PING : f"{ PROTOCOL_PACKAGE } .messages.ping.Ping" ,
You can’t perform that action at this time.
0 commit comments