Skip to content

Commit 5e567ad

Browse files
authored
Merge branch 'hyperledger:main' into feature/fix_debug_options_demo
2 parents 2777d02 + 06829f6 commit 5e567ad

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

aries_cloudagent/protocols/out_of_band/v1_0/manager.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ async def create_invitation(
121121
mediation_id,
122122
or_default=True,
123123
)
124+
image_url = self.profile.context.settings.get("image_url")
124125

125126
if not (hs_protos or attachments):
126127
raise OutOfBandManagerError(
@@ -235,6 +236,7 @@ async def create_invitation(
235236
services=[f"did:sov:{public_did.did}"],
236237
accept=service_accept if protocol_version != "1.0" else None,
237238
version=protocol_version or DEFAULT_VERSION,
239+
image_url=image_url,
238240
)
239241

240242
our_recipient_key = public_did.verkey
@@ -333,6 +335,7 @@ async def create_invitation(
333335
invi_msg.handshake_protocols = handshake_protocols
334336
invi_msg.requests_attach = message_attachments
335337
invi_msg.accept = service_accept if protocol_version != "1.0" else None
338+
invi_msg.image_url = image_url
336339
invi_msg.services = [
337340
ServiceMessage(
338341
_id="#inline",

aries_cloudagent/protocols/out_of_band/v1_0/messages/invitation.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def __init__(
120120
*,
121121
comment: str = None,
122122
label: str = None,
123+
image_url: str = None,
123124
handshake_protocols: Sequence[Text] = None,
124125
requests_attach: Sequence[AttachDecorator] = None,
125126
services: Sequence[Union[Service, Text]] = None,
@@ -138,6 +139,7 @@ def __init__(
138139
# super().__init__(_id=_id, **kwargs)
139140
super().__init__(_type=msg_type, _version=version, **kwargs)
140141
self.label = label
142+
self.image_url = image_url
141143
self.handshake_protocols = (
142144
list(handshake_protocols) if handshake_protocols else []
143145
)
@@ -208,6 +210,13 @@ class Meta:
208210
example="https://didcomm.org/my-family/1.0/my-message-type",
209211
)
210212
label = fields.Str(required=False, description="Optional label", example="Bob")
213+
image_url = fields.URL(
214+
data_key="imageUrl",
215+
required=False,
216+
allow_none=True,
217+
description="Optional image URL for out-of-band invitation",
218+
example="http://192.168.56.101/img/logo.jpg",
219+
)
211220
handshake_protocols = fields.List(
212221
fields.Str(
213222
description="Handshake protocol",

0 commit comments

Comments
 (0)