forked from finos/symphony-wdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact-sharing.swadl.yaml
30 lines (30 loc) · 1023 Bytes
/
contact-sharing.swadl.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
id: contact-sharing
activities:
- get-user:
id: getUser
on:
message-received:
content: send @{user} details to @{recipient}
user-id: ${mentions(event)[0]}
- create-room:
id: createOneToOne
user-ids:
- ${mentions(event)[1]}
- send-message:
id: sendDetails
to:
stream-id: ${createOneToOne.outputs.roomId}
content: |
<messageML>
<h2>Contact information for ${event.args.user}</h2>
<hr/>
<b>Email address:</b> <a href="mailto:${getUser.outputs.user.userAttributes.emailAddress}">${getUser.outputs.user.userAttributes.emailAddress}</a>
<br/>
<b>Work phone number:</b> <a href="skype:${getUser.outputs.user.userAttributes.workPhoneNumber}">${getUser.outputs.user.userAttributes.workPhoneNumber}</a>
<hr/>
<i>Shared by ${event.initiator.user.displayName}</i>
</messageML>
- send-message:
id: feedback
content: |
Contact details sent!