Skip to content

Commit

Permalink
Refactor append function to include message ID in response
Browse files Browse the repository at this point in the history
  • Loading branch information
yannicktrinh committed Mar 18, 2024
1 parent d169e0f commit 14d13af
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Project/Sources/Classes/GoogleMail.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,20 @@ Function _postMessage($inFunction : Text; $inURL : Text; $inMail : Variant; $inH


Function append($inMail : Variant) : Object

var $URL : Text:=Super._getURL()
var $userId : Text:=(Length(String(This.userId))>0) ? This.userId : "me"
$URL+="users/"+$userId+"/messages/"

return This._postMessage("append"; $URL; $inMail)


var $status : Object:=This._postMessage("append"; $URL; $inMail)
If (Length(String(This._internals._response.id))>0)
$status.id:=String(This._internals._response.id)
End if

return $status



// ----------------------------------------------------


Expand Down

0 comments on commit 14d13af

Please sign in to comment.