generated from intersystems-community/intersystems-iris-dev-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6797f62
commit 4bec490
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Class dc.irisMediCopilot.interop.dtl.NewUser Extends Ens.DataTransform [ DependsOn = (Telegram.JSONContainer, Telegram.Request) ] | ||
{ | ||
|
||
ClassMethod Transform(source As Telegram.JSONContainer, ByRef target As Telegram.Request) As %Status | ||
{ | ||
Set tSC = $$$OK | ||
Try { | ||
|
||
Set target = ##class(Telegram.Request).%New() | ||
|
||
Set data = { | ||
"chat_id": (source.Data.message.chat.id), | ||
"protect_content": 1 | ||
} | ||
|
||
Set target.Method = "sendMessage" | ||
Set data."text" = "Welcome "_source.Data.message."new_chat_participant"."first_name"_ " to Iris MediCoPilot" | ||
|
||
Set target.Data = data | ||
|
||
} Catch ex { | ||
Set tSC = ex.AsStatus() | ||
} | ||
Return tSC | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters