Merge pull request #2478 from forslund/bugfix/message-response

Make message.response keep source/dest info
pull/2480/head
Åke 2020-02-24 12:48:11 +01:00 committed by GitHub
commit 6220aeb1e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -138,8 +138,8 @@ class Message:
Returns
(Message) message with the type modified to match default response
"""
response_message = self.reply(self.msg_type, data or {}, context)
response_message.msg_type += '.response'
response_message = Message(self.msg_type + '.response', data or {},
context or self.context)
return response_message
def publish(self, msg_type, data, context=None):