SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
Loading...
Searching...
No Matches
sfs3::event::BuddyMessage Struct Reference

Dispatched when a buddy message is received. More...

#include <SFSEvent.h>

Public Attributes

bool isItMe
 True if the current user is the sender of the message.
std::shared_ptr< entities::Buddybuddy
 The buddy who sent the message, or the recipient when isItMe is true.
std::string message
 The message.
std::shared_ptr< entities::SFSObjectdata
 The custom parameters the sender attached to the message, or nullptr if none.

Detailed Description

Dispatched when a buddy message is received.

It is caused by a requests::buddy::BuddyMessageRequest. The messages this client sent are echoed back too — isItMe tells the two apart.

See also
requests::buddy::BuddyMessageRequest
entities::Buddy

Member Data Documentation

◆ buddy

std::shared_ptr<entities::Buddy> sfs3::event::BuddyMessage::buddy

The buddy who sent the message, or the recipient when isItMe is true.

It can be nullptr: without mutual buddy adding (the default) the recipient may not have the sender in his own list at all. The temporary buddy feature, when it is on, adds him to the list before the message arrives.


The documentation for this struct was generated from the following file: