docs: def compile_msg_payload(self, invite):
          """ Determine recipient, message content, return it as
          a dict that can be Posted to the message sender
          """
          self.l.info("Compiling the outbound message payload")
          update_invite = False
  
          # Determine the recipient address
          if "to_addr" in invite.invite:
              to_addr = invite.invite["to_addr"]
          else:
              update_invite = True
              to_addr = get_identity_address(invite.identity)
  
          # Determine the message content
          if "content" in invite.invite:
              content = invite.invite["content"]
          else:
              update_invite = True
              content = settings.INVITE_TEXT
  
          # Determine the metadata
          if "metadata" in invite.invite:
              metadata = invite.invite["metadata"]
          else:
              update_invite = True
              metadata = {}
  
          msg_payload = {
              "to_addr": to_addr,
              "content": content,
              "metadata": metadata
          }
  
          if update_invite is True:
              self.l.info("Updating the invite.invite field")
              invite.invite = msg_payload
              invite.save()
  
          self.l.info("Compiled the outbound message payload")
          return msg_payload