vx_evt_user_to_user_message
Raised when a message from another user is received.
읽는 시간 4분최근 업데이트: 10일 전
Raised when a message from another user is received. More...
#include <VxcEvents.h>Public Attributes
| |
|---|---|
base The common properties for all events. | |
account_handle The handle returned from a successful account login request. | |
char * | from_uri The URI of the account sending the message. |
char * | encoded_uri_with_tag The encoded URI for the sending user with the tag. |
char * | message_body The content of the message being received, UTF-8 encoded. |
char * | message_id The id of the message. |
char * | language The language (default NULL, implies "en"). |
char * | application_stanza_namespace The namespace of the custom application stanza (optional, default NULL). |
char * | application_stanza_body The custom application stanza body (optional, default NULL). |
char * | from_displayname The displayname, if the from_uri had a displayname. |
int | is_current_user Whether the message was sent by the currently logged-in user (1 = true, 0 = false). |
char * | to_uri The URI of the original recipient of the message (optional, default NULL). |
int | is_translated Set to 1 when message_body holds text translated by the service, and language is the language it was translated into rather than the language the sender wrote in. |
Detailed Description
struct vx_evt_user_to_user_message;
Raised when a message from another user is received.
Note: V5 only.
Public Attributes Documentation
variable base
vx_evt_base_t base;
The common properties for all events.
variable account_handle
VX_HANDLE account_handle;
The handle returned from a successful account login request.
variable from_uri
char * from_uri;
The URI of the account sending the message.
variable encoded_uri_with_tag
char * encoded_uri_with_tag;
The encoded URI for the sending user with the tag.
This uniquely identifies users that might be logged in with the same account name from multiple devices (Multi-Login).
variable message_body
char * message_body;
The content of the message being received, UTF-8 encoded.
variable message_id
char * message_id;
The id of the message.
It is empty unless chat history is enabled.
variable language
char * language;
The language (default NULL, implies "en").
variable application_stanza_namespace
char * application_stanza_namespace;
The namespace of the custom application stanza (optional, default NULL).
variable application_stanza_body
char * application_stanza_body;
The custom application stanza body (optional, default NULL).
variable from_displayname
char * from_displayname;
The displayname, if the from_uri had a displayname.
variable is_current_user
int is_current_user;
Whether the message was sent by the currently logged-in user (1 = true, 0 = false).
This is set to 1 when the server echoes a direct message back to the sender.
variable to_uri
char * to_uri;
The URI of the original recipient of the message (optional, default NULL).
This is populated for direct message echoes so the sender can determine which conversation the echoed message belongs to. For echoes the from_uri is the sender's own URI, so to_uri is the only way to recover the intended recipient.
variable is_translated
int is_translated;
Set to 1 when message_body holds text translated by the service, and language is the language it was translated into rather than the language the sender wrote in.