Groups Info
groups_info_destroy_group
Nukes a group from orbit. This is permanent (i.e. there is no removing this setting once set).
Declaration
Parameters
conf
— [in] Pointer to the config object
Returns
groups_info_get_attach_delete_before
Returns the delete-before timestamp (unix time, in seconds) for attachments; clients should drop all attachments from messages from the group with timestamps earlier than this value, if set.
Declaration
Parameters
conf
— [in] Pointer to the config object
Returns
int64_t
— Unix timestamp before which messages should be deleted. Returns 0 if not set.
groups_info_get_created
Returns the timestamp (unix time, in seconds) when the group was created. Returns 0 if unset.
Declaration
Parameters
conf
— [in] Pointer to the config object
Returns
int64_t
— Unix timestamp when the group was created (if set by an admin).
groups_info_get_delete_before
Returns the delete-before timestamp (unix time, in seconds); clients should delete all messages from the group with timestamps earlier than this value, if set.
Declaration
Parameters
conf
— [in] Pointer to the config object
Returns
int64_t
— Unix timestamp before which messages should be deleted. Returns 0 if not set.
groups_info_get_description
Returns a pointer to the currently-set description (null-terminated), or NULL if there is no description at all. Should be copied right away as the pointer may not remain valid beyond other API calls.
Declaration
Parameters
conf
— [in] Pointer to the config object
Returns
char*
— Pointer to the currently-set description as a null-terminated string, or NULL if there is no description
groups_info_get_expiry_timer
Gets the group's message expiry timer (seconds). Returns 0 if not set.
Declaration
Parameters
conf
— [in] Pointer to the config object
Returns
int
— Returns the expiry timer in seconds. Returns 0 if not set
groups_info_get_name
Returns a pointer to the currently-set name (null-terminated), or NULL if there is no name at all. Should be copied right away as the pointer may not remain valid beyond other API calls.
Declaration
Parameters
conf
— [in] Pointer to the config object
Returns
char*
— Pointer to the currently-set name as a null-terminated string, or NULL if there is no name
groups_info_get_pic
Obtains the current profile pic. The pointers in the returned struct will be NULL if a profile pic is not currently set, and otherwise should be copied right away (they will not be valid beyond other API calls on this config object).
Declaration
Parameters
conf
— [in] Pointer to the config object
Returns
user_profile_pic
— Pointer to the currently-set profile pic (despite the "user_profile" in the struct name, this is the group's profile pic).
groups_info_is_destroyed
Returns true if this group has been marked destroyed by an admin, which indicates to a receiving client that they should destroy it locally.
Declaration
Parameters
conf
— [in] Pointer to the config object
Returns
true
if the group has been nuked,false
otherwise.
groups_info_set_attach_delete_before
Sets the delete-before time (unix timestamp, in seconds) for attachments; attachments should be dropped from messages older than this value. Setting 0 clears the value.
Declaration
Parameters
conf
— [in] Pointer to the config objectts
— [in] the unix timestamp, or 0 to clear a current value.
Returns
groups_info_set_created
Sets the creation time (unix timestamp, in seconds) when the group was created. Setting 0 clears the value.
Declaration
Parameters
conf
— [in] Pointer to the config objectts
— [in] the unix timestamp, or 0 to clear a current value.
Returns
groups_info_set_delete_before
Sets the delete-before time (unix timestamp, in seconds) before which messages should be deleted. Setting 0 clears the value.
Declaration
Parameters
conf
— [in] Pointer to the config objectts
— [in] the unix timestamp, or 0 to clear a current value.
Returns
groups_info_set_description
Sets the group's description to the null-terminated C string. Returns 0 on success, non-zero on error (and sets the config_object's error string).
If the given description is longer than GROUP_INFO_DESCRIPTION_MAX_LENGTH (2000) bytes then it will be truncated.
Declaration
Parameters
conf
— [in] Pointer to the config objectdescription
— [in] Pointer to the description as a null-terminated C string
Returns
int
— Returns 0 on success, non-zero on error
groups_info_set_expiry_timer
Sets the group's message expiry timer (seconds). Setting 0 (or negative) will clear the current timer.
Declaration
Parameters
conf
— [in] Pointer to the config objectexpiry
— [in] Integer of the expiry timer in seconds
Returns
groups_info_set_name
Sets the group's name to the null-terminated C string. Returns 0 on success, non-zero on error (and sets the config_object's error string).
If the given name is longer than GROUP_INFO_NAME_MAX_LENGTH (100) bytes then it will be truncated.
Declaration
Parameters
conf
— [in] Pointer to the config objectname
— [in] Pointer to the name as a null-terminated C string
Returns
int
— Returns 0 on success, non-zero on error
groups_info_set_pic
Sets a user profile
Declaration
Parameters
conf
— [in] Pointer to the config objectpic
— [in] Pointer to the pic
Returns
int
— Returns 0 on success, non-zero on error