Skip to content

Commit

Permalink
Merge branch 'main' into fix/1965/arg-parse-auto-promote-author-did
Browse files Browse the repository at this point in the history
  • Loading branch information
swcurran authored Oct 18, 2022
2 parents 9d70694 + 709a1d4 commit fbb7b31
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
3 changes: 3 additions & 0 deletions aries_cloudagent/protocols/out_of_band/v1_0/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ async def create_invitation(
mediation_id,
or_default=True,
)
image_url = self.profile.context.settings.get("image_url")

if not (hs_protos or attachments):
raise OutOfBandManagerError(
Expand Down Expand Up @@ -235,6 +236,7 @@ async def create_invitation(
services=[f"did:sov:{public_did.did}"],
accept=service_accept if protocol_version != "1.0" else None,
version=protocol_version or DEFAULT_VERSION,
image_url=image_url,
)

our_recipient_key = public_did.verkey
Expand Down Expand Up @@ -333,6 +335,7 @@ async def create_invitation(
invi_msg.handshake_protocols = handshake_protocols
invi_msg.requests_attach = message_attachments
invi_msg.accept = service_accept if protocol_version != "1.0" else None
invi_msg.image_url = image_url
invi_msg.services = [
ServiceMessage(
_id="#inline",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def __init__(
*,
comment: str = None,
label: str = None,
image_url: str = None,
handshake_protocols: Sequence[Text] = None,
requests_attach: Sequence[AttachDecorator] = None,
services: Sequence[Union[Service, Text]] = None,
Expand All @@ -138,6 +139,7 @@ def __init__(
# super().__init__(_id=_id, **kwargs)
super().__init__(_type=msg_type, _version=version, **kwargs)
self.label = label
self.image_url = image_url
self.handshake_protocols = (
list(handshake_protocols) if handshake_protocols else []
)
Expand Down Expand Up @@ -208,6 +210,13 @@ class Meta:
example="https://didcomm.org/my-family/1.0/my-message-type",
)
label = fields.Str(required=False, description="Optional label", example="Bob")
image_url = fields.URL(
data_key="imageUrl",
required=False,
allow_none=True,
description="Optional image URL for out-of-band invitation",
example="http://192.168.56.101/img/logo.jpg",
)
handshake_protocols = fields.List(
fields.Str(
description="Handshake protocol",
Expand Down
8 changes: 5 additions & 3 deletions demo/run_demo
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ if [ -z "$DOCKER_NET" ]; then
fi
DOCKER_VOL=""

j=1
for i in "$@"
do
((j++))
if [ ! -z "$SKIP" ]; then
SKIP=""
continue
Expand Down Expand Up @@ -65,12 +67,12 @@ do
continue
;;
--debug-pycharm-controller-port)
PYDEVD_PYCHARM_CONTROLLER_PORT=$2
PYDEVD_PYCHARM_CONTROLLER_PORT=${!j}
SKIP=1
continue
;;
--debug-pycharm-agent-port)
PYDEVD_PYCHARM_AGENT_PORT=$2
PYDEVD_PYCHARM_AGENT_PORT=${!j}
SKIP=1
continue
;;
Expand Down Expand Up @@ -154,7 +156,7 @@ if [ ! -z "$DOCKERHOST" ]; then
export RUNMODE="docker"
elif [ -z "${PWD_HOST_FQDN}" ]; then
# getDockerHost; for details refer to https://github.com/bcgov/DITP-DevOps/tree/main/code/snippets#getdockerhost
. /dev/stdin <<<"$(cat <(curl -s --raw https://raw.githubusercontent.com/bcgov/DITP-DevOps/main/code/snippets/getDockerHost))"
. /dev/stdin <<<"$(cat <(curl -s --raw https://raw.githubusercontent.com/bcgov/DITP-DevOps/main/code/snippets/getDockerHost))"
export DOCKERHOST=$(getDockerHost)
export RUNMODE="docker"
else
Expand Down

0 comments on commit fbb7b31

Please sign in to comment.