"For developers", "Server scripts", "Functions description", "Dialogues",

"mCloseAllDialogs".

 

Close all private dialogues for the server users.

 

Syntax

procedure mCloseAllDialogs(bAll: boolean);

 

Parameters and return values

Parameter

Type

Value

bAll

boolean

if "true", then all dialogues will be closed; if "close" — only dialogues with received and seen messages.

 

Function result

Dialogues will be closed immediately. No changes will be seen in client applications; dialogues disappear right after the program restart or reconnection to the server.

 

Example

If your server maintains a large number of users and you do not want them to have a lot of dialogues open, then you can set the function of automatic closing for seen dialogues in a scheduler (for example, every hour):

 

Автоматическое закрытие прочитанных приватных диалогов у всех пользователей сервера MyChat

begin
  mCloseAllDialogs(false); // close only seen dialodues (false),
                           // if true, all dialogues will be closed
                           // even with offline or unread messages
end.