Menu
Welcome
Quick start guide
Installing on your site
Connecting as operator
Operator commands
API
Operator settings
Roster variables and macroses

Sitehelp API - setStatus

API :: setStatus


Function allows to set current status (presence) of client in contact list
SITEHELP_API.setStatus(
	{
		status:   // new status string

		success:  // function will be called once status is successfully received, with status string as first parameter
		error: // function will be called on error, with error message as first parameter
	}
);


Example:

SITEHELP_API.onReady (SetMyStatus);

function SetMyStatus() {
	SITEHELP_API.setStatus(
		{
			status: 'here is my new status',

			success: function (reply_status) {
				alert("My status is : " + reply_status);
			},
			error: function (error_msg) {
				alert("setStatus ERROR:" + error_msg);
			}
		}
	);
};
Copyright 2011-2014 by Sitehelp.im.