MyChat Server event: OnKanbanCommentAdd, placing a comment to a task
An event occurring when placing a new comment to a task on Kanban board.
Event template
function OnKanbanCommentAdd(iCID: int64; iUIN: integer; var sJSONData: string): boolean;
begin
result := true;
// your own code
end;
begin
end.
Input your code instead of the comment.
Parameter descriptions
Parameter |
Type |
Value |
iCID |
int64 |
Connection ID of a client-sender, unique session ID in online structure of network connections to the server; |
iUIN |
integer |
unique ID of the command sender(number > 0); |
sJSONData |
string |
changeable parameter, content of the command as a text string JSON. |
Parameter sJSONData |
Type |
Value |
ID |
integer |
Kanban project ID, number; |
CommentType |
integer |
comment type, number, by default 0; |
CommentText |
string |
comment text; |
Files |
object |
JSON object as a text string with a lsit of attached files, unnecessary parameter. |
Return values
By default, the function must return "true", however, if you return "false", the comment will not place, and the application receives the error #0332. You can also edit JSON object by changing parameters.
Example
A user has a custom menu. When clicking on an menu item ("OpenPrivateSupport"), it must launch a script to receive information on behalf of the built-in bot, and also forcibly switch the focus to a private dialogue with UIN=0.
procedure OnClientRemoteExec(iUIN, iCID: integer; sCmd, sData, sAppType: string);
begin
if sCmd = 'OpenPrivateSupport' then begin
mSendPrivateMessage(0, iUIN, 'Hello world. Custom data is:" ' + sData + '"', 1);
mSetRemoteClientCurrentPlaceID(iUIN, 0, 1, false);
end;
end;
begin
end.