示例#1
0
        /// <summary>
        /// Sends a <seealso cref="PresenceMessage"/> to the given target with the given presence and status.
        /// </summary>
        /// <param name="from">Who is sending this message? E.g. '*****@*****.**'. Can be null.</param>
        /// <param name="to">Who is the target of this message? E.g. '*****@*****.**'. Can be null.</param>
        /// <param name="presence">The presence that should get send to the server.</param>
        /// <param name="status">The status message that should get send to the server.</param>
        /// <returns>The id of the send <seealso cref="PresenceMessage"/>.</returns>
        public async Task <string> setPreseceAsync(string from, string to, Presence presence, string status)
        {
            PresenceMessage presenceMessage = new PresenceMessage(from, to, presence, status, int.MinValue);
            await CONNECTION.SendAsync(presenceMessage);

            return(presenceMessage.ID);
        }