Documentation

GetMessagesForChat

CDBResult
CSocNetMessages::GetMessagesForChat(
 int currentUserID,
 int userID,
 string date = false,
 array arNavStartParams = false,
 int replyMessId = false
);

The method returns correspondence messges between users. Non-static method.

Parameters

Parameter Description Available from version
currentUserID Current user ID.
userID Second user ID.
date Date, starting from which messages are selected. Must have format YYYY-MM-DD HH:II:SS. When the parameter replyMessId is specified, the date is not taken into account.
arNavStartParams Parameter for pagewise navigation configuration.
replyMessId Message ID , начиная с которого выбираются сообщения.

Returned value

CDBResult object, containing correspondence messages.
Each message has the following fields:
WHO - incoming and outgoing message (IN/OUT),
ID - message ID,
USER_ID - user ID who is part of correspondence,
MESSAGE - message,
DATE_VIEW - date when read,
DATE_CREATE - date when created,
DATE_CREATE_FMT - date when created in the format YYYY-MM-DD HH:II:SS.

See Also

  • [link=89808]CDBResult[/link]


© «Bitrix24», 2001-2024
Up