Chat extends AbstractEntity
Table of Contents
Constants
- MUTE_MESSAGE = true
Properties
- $chatFields : mixed
Methods
- __construct() : mixed
- canExtendChat() : bool
- canStartCall() : bool
- Returns true is user can call users in the associated chat and false otherwise.
- checkAccess() : bool
- Returns true is user has access to the associated chat and false otherwise.
- getAvatar() : mixed
- getAvatarColor() : mixed
- getCall() : Call
- getCallDuration() : string
- getChatId() : mixed
- getEntityId() : mixed
- getEntityType() : string
- Returns associated entity type.
- getName() : string|false
- Returns associated entity name.
- getUsers() : array<string|int, mixed>
- Returns list of users in the chat
- isBroadcast() : mixed
- isPrivateChat() : bool
- onCallCreate() : bool
- onExistingUsersInvite() : bool
- onStateChange() : mixed
- onUserAdd() : bool
- sendMessage() : mixed
- sendMessageDeferred() : mixed
- sendMessagesCallStart() : void
- setCall() : mixed
- toArray() : mixed
Constants
MUTE_MESSAGE
public
mixed
MUTE_MESSAGE
= true
Properties
$chatFields
public
mixed
$chatFields
Methods
__construct()
public
__construct(Call $call, mixed $entityId) : mixed
Parameters
- $call : Call
- $entityId : mixed
canExtendChat()
public
canExtendChat() : bool
Return values
boolcanStartCall()
Returns true is user can call users in the associated chat and false otherwise.
public
canStartCall(int $userId) : bool
Parameters
- $userId : int
Return values
boolcheckAccess()
Returns true is user has access to the associated chat and false otherwise.
public
checkAccess(int $userId) : bool
Parameters
- $userId : int
Return values
boolgetAvatar()
public
getAvatar(mixed $currentUserId) : mixed
Parameters
- $currentUserId : mixed
getAvatarColor()
public
getAvatarColor(mixed $currentUserId) : mixed
Parameters
- $currentUserId : mixed
getCall()
public
getCall() : Call
Return values
CallgetCallDuration()
public
getCallDuration() : string
Return values
stringgetChatId()
public
getChatId() : mixed
getEntityId()
public
getEntityId([mixed $currentUserId = 0 ]) : mixed
Parameters
- $currentUserId : mixed = 0
getEntityType()
Returns associated entity type.
public
getEntityType() : string
Return values
stringgetName()
Returns associated entity name.
public
getName(int $currentUserId) : string|false
Parameters
- $currentUserId : int
-
Id of the user.
Return values
string|falsegetUsers()
Returns list of users in the chat
public
getUsers() : array<string|int, mixed>
Return values
array<string|int, mixed>isBroadcast()
public
isBroadcast() : mixed
isPrivateChat()
public
isPrivateChat() : bool
Return values
boolonCallCreate()
public
onCallCreate() : bool
Return values
boolonExistingUsersInvite()
public
onExistingUsersInvite(mixed $userIds) : bool
Parameters
- $userIds : mixed
Return values
boolonStateChange()
public
onStateChange(mixed $state, mixed $prevState) : mixed
Parameters
- $state : mixed
- $prevState : mixed
onUserAdd()
public
onUserAdd(mixed $userId) : bool
Parameters
- $userId : mixed
Return values
boolsendMessage()
public
sendMessage(mixed $message[, mixed $muted = false ][, mixed $skipCounterInc = false ][, mixed $componentParams = [] ]) : mixed
Parameters
- $message : mixed
- $muted : mixed = false
- $skipCounterInc : mixed = false
- $componentParams : mixed = []
sendMessageDeferred()
public
sendMessageDeferred(mixed $message[, mixed $muted = false ][, mixed $skipCounterInc = false ][, mixed $componentParams = [] ]) : mixed
Parameters
- $message : mixed
- $muted : mixed = false
- $skipCounterInc : mixed = false
- $componentParams : mixed = []
sendMessagesCallStart()
public
sendMessagesCallStart() : void
setCall()
public
setCall(Call $call) : mixed
Parameters
- $call : Call
toArray()
public
toArray([mixed $initiatorId = 0 ]) : mixed
Parameters
- $initiatorId : mixed = 0