Exemplo n.º 1
0
        /// <summary>
        /// Occurs when a new user was created.
        /// </summary>
        private void OnUserCreate(User user)
        {
            // Create a request for the avatar
            var request = new AvatarRequest()
            {
                Token = user.Token
            };

            // Publish the request
            Emitter.Publish(Key.AvatarRequest, "avatar-request/v1/", request.Serialize());
        }
Exemplo n.º 2
0
 /// <summary>
 /// Occurs when a new user was created.
 /// </summary>
 private void OnUserLeave(User user)
 {
     Emitter.Publish(Key.UserNotify, "user-notify/v1/leave/", user.Serialize());
 }
Exemplo n.º 3
0
 /// <summary>
 /// Occurs when a new user was created.
 /// </summary>
 private void OnUserJoin(User user)
 {
     Emitter.Publish(Key.UserNotify, "user-notify/v1/join/", user.Serialize());
 }
Exemplo n.º 4
0
 /// <summary>
 /// Updates a user.
 /// </summary>
 private User UpdateUserActivity(string key, User user)
 {
     // Update the last time we've pinged it.
     user.LastPing = DateTime.UtcNow;
     return user;
 }