Событие MyChat Server: OnKanbanCommentDelete, удаление комментария в задаче канбан-проекта
An event that occurs when deleting a comment in 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.
Description of parameters
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 string: |
Parameter sJSONData |
Type |
Value |
ID |
integer |
Kanban project ID, number; |
IDComment |
integer |
comment identifier, number. |
Return value
By default, the function must return "true", however, if you return "false", the comment won't be removed, the event fails, and the application gets en error #0332. You can also edit the JSON object by modifying command parameters.
Example
When deleting a comment, control the one who delete a comment. If this is a user with UIN specified in the constant ALLOW_USER, then allow the event, if not — ignore this attempt.
const
ALLOW_USER = 6;
function OnKanbanCommentDelete(iCID: int64; iUIN: integer; var sJSONData: string): boolean;
begin
if iUIN <> ALLOW_USER then
Result := false
else
Result := true;
end;
begin
end.
See also
A list of common events of MyChat Server script engine
Created with the Personal Edition of HelpNDoc: Maximize Your Productivity with HelpNDoc's Efficient User Interface