Exemple #1
0
        // Token: 0x06006046 RID: 24646 RVA: 0x0021E7EC File Offset: 0x0021CBEC
        public void RequestInvitation()
        {
            string message = "Please invite me to your world";

            ApiNotification.SendNotification(this.user.id, ApiNotification.NotificationType.Requestinvite, message, null, null, null);
            this.SetupJoinButton("Req Sent", false);
        }
 // Token: 0x0600534F RID: 21327 RVA: 0x001CA6D0 File Offset: 0x001C8AD0
 public void RemoveNotification(ApiNotification n, NotificationManager.HistoryRange historyRange)
 {
     if (this.notifications.ContainsKey(historyRange) && this.notifications[historyRange].ContainsKey(n.notificationType))
     {
         this.notifications[historyRange][n.notificationType].Remove(this.notifications[historyRange][n.notificationType].First((ApiNotification no) => no.id == n.id));
     }
 }
Exemple #3
0
    // Token: 0x06006108 RID: 24840 RVA: 0x00223CC0 File Offset: 0x002220C0
    public void SetupElement(ApiNotification n, QuickMenuSocialElement.IconType icon = QuickMenuSocialElement.IconType.None)
    {
        APIUser cachedUser = APIUser.GetCachedUser(n.senderUserId);

        if (cachedUser != null)
        {
            this.SetupElement(cachedUser, QuickMenuSocialElement.IconType.None);
            this.SetIcon(icon, cachedUser.id);
            this.notification = n;
            this.elementType  = QuickMenuSocialElement.ElementType.Notification;
        }
        else
        {
            APIUser.Fetch(n.senderUserId, delegate(APIUser user)
            {
                this.SetupElement(user, QuickMenuSocialElement.IconType.None);
                this.SetIcon(icon, user.id);
                this.notification = n;
                this.elementType  = QuickMenuSocialElement.ElementType.Notification;
            }, delegate(string obj)
            {
                Debug.LogError(obj);
            });
        }
    }
Exemple #4
0
        /// <summary>
        /// Retrieves the order status data from OmniKassa
        /// </summary>
        /// <param name="notification">Notification received from the webhook</param>
        /// <returns>Order status info</returns>
        public MerchantOrderStatusResponse RetrieveAnnouncement(ApiNotification notification)
        {
            notification.ValidateSignature(httpClient.SigningKey);

            MerchantOrderStatusResponse response = httpClient.GetOrderStatusData(notification);

            return(response);
        }
Exemple #5
0
        // Token: 0x06006045 RID: 24645 RVA: 0x0021E778 File Offset: 0x0021CB78
        public void InviteFriend()
        {
            string message = "Join me in " + RoomManager.currentRoom.name;
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            dictionary["worldId"] = RoomManager.currentRoom.id + ":" + RoomManager.currentRoom.currentInstanceIdWithTags;
            ApiNotification.SendNotification(this.user.id, ApiNotification.NotificationType.Invite, message, dictionary, null, null);
            this.SetupInviteButton("Invite Sent", false);
        }
Exemple #6
0
 public void SendMessage()
 {
     ApiNotification.SendNotification(this.selectedUser.id, ApiNotification.NotificationType.All, ConsoleUtils.AskInput("Enter message: "), null, delegate(ApiNotification notification)
     {
         Console.WriteLine("Message sent!");
     }, delegate(string error)
     {
         Console.WriteLine("Error sending message");
     });
 }
Exemple #7
0
    // Token: 0x06006102 RID: 24834 RVA: 0x002236E0 File Offset: 0x00221AE0
    private void SetupNotifications()
    {
        Action <List <ApiNotification> > SetupNotifs = delegate(List <ApiNotification> notifs)
        {
            List <ApiNotification> notificationsOfType4 = NotificationManager.Instance.GetNotificationsOfType(ApiNotification.NotificationType.VoteToKick, NotificationManager.HistoryRange.Local);
            notifs.AddRange(notificationsOfType4);
            int num = 0;
            for (int i = 0; i < this.elements.Length; i++)
            {
                if (num < notifs.Count)
                {
                    ApiNotification apiNotification = notifs[num];
                    if (apiNotification.notificationType == ApiNotification.NotificationType.Friendrequest)
                    {
                        apiNotification.message = apiNotification.senderUsername + " would like to be your friend";
                    }
                    if (this.elements[i].elementType == QuickMenuSocialElement.ElementType.Empty || this.elements[i].elementType == QuickMenuSocialElement.ElementType.Notification)
                    {
                        QuickMenuSocialElement.IconType iconTypeForNotificationType = QuickMenuSocialElement.GetIconTypeForNotificationType(apiNotification.notificationType);
                        this.elements[i].SetupElement(apiNotification, iconTypeForNotificationType);
                        num++;
                    }
                }
            }
        };
        List <ApiNotification> priority             = NotificationManager.Instance.GetNotificationsOfType(ApiNotification.NotificationType.Halp, NotificationManager.HistoryRange.Recent);
        List <ApiNotification> notificationsOfType  = NotificationManager.Instance.GetNotificationsOfType(ApiNotification.NotificationType.Invite, NotificationManager.HistoryRange.Recent);
        List <ApiNotification> notificationsOfType2 = NotificationManager.Instance.GetNotificationsOfType(ApiNotification.NotificationType.Requestinvite, NotificationManager.HistoryRange.Recent);
        List <ApiNotification> notificationsOfType3 = NotificationManager.Instance.GetNotificationsOfType(ApiNotification.NotificationType.Friendrequest, NotificationManager.HistoryRange.Recent);

        priority.AddRange(notificationsOfType);
        priority.AddRange(notificationsOfType2);
        priority.AddRange(notificationsOfType3);
        SetupNotifs(priority);
        if (this.dontFetchNotificationsForOnePeriod)
        {
            this.dontFetchNotificationsForOnePeriod = false;
        }
        else
        {
            NotificationManager.Instance.FetchNotifications(NotificationManager.HistoryRange.Recent, delegate(List <ApiNotification> notifs)
            {
                notifs.RemoveAll((ApiNotification x) => x.notificationType == ApiNotification.NotificationType.Hidden);
                IEnumerable <string> source = (from x in priority
                                               select x.id).Except(from x in notifs
                                                                   select x.id);
                bool flag = source.Count <string>() > 0 || priority.Count != notifs.Count;
                if (flag)
                {
                    SetupNotifs(notifs);
                }
            });
        }
    }
 // Token: 0x0600534E RID: 21326 RVA: 0x001CA628 File Offset: 0x001C8A28
 public void AddNotification(ApiNotification n, NotificationManager.HistoryRange historyRange)
 {
     if (!this.notifications.ContainsKey(historyRange))
     {
         this.notifications[historyRange] = new Dictionary <ApiNotification.NotificationType, List <ApiNotification> >();
     }
     if (!this.notifications[historyRange].ContainsKey(n.notificationType))
     {
         this.notifications[historyRange][n.notificationType] = new List <ApiNotification>();
     }
     if (!this.notifications[historyRange][n.notificationType].Contains(n))
     {
         this.notifications[historyRange][n.notificationType].Add(n);
     }
 }
    // Token: 0x0600534B RID: 21323 RVA: 0x001CA3B0 File Offset: 0x001C87B0
    public void FetchNotifications(NotificationManager.HistoryRange historyRange, Action <List <ApiNotification> > onSuccess = null)
    {
        if (!RoomManager.inRoom)
        {
            return;
        }
        string afterString = string.Empty;

        if (historyRange != NotificationManager.HistoryRange.AllTime)
        {
            if (historyRange == NotificationManager.HistoryRange.Recent)
            {
                afterString = "4_minutes_ago";
            }
        }
        this.ClearOldLocalNotifications();
        if (Player.Instance != null && Player.Instance.isInternal)
        {
            this.CheckAndClearHandledHalps();
        }
        ApiNotification.FetchAll(ApiNotification.NotificationType.All, false, afterString, delegate(List <ApiNotification> notifs)
        {
            if (this.notifications.ContainsKey(historyRange))
            {
                this.notifications[historyRange].Clear();
            }
            foreach (ApiNotification n in notifs)
            {
                this.AddNotification(n, historyRange);
            }
            if (onSuccess != null)
            {
                onSuccess(notifs);
            }
            if (this.OnRecentNotificationsFetched != null)
            {
                this.OnRecentNotificationsFetched(notifs);
            }
        }, delegate
        {
            Debug.LogError("Could not fetch Notifications");
        });
    }
    // Token: 0x0600534D RID: 21325 RVA: 0x001CA504 File Offset: 0x001C8904
    private void CheckAndClearHandledHalps()
    {
        List <ApiNotification> notificationsOfType = this.GetNotificationsOfType(ApiNotification.NotificationType.Halp, NotificationManager.HistoryRange.Recent);

        foreach (ApiNotification apiNotification in notificationsOfType)
        {
            List <ApiNotification> notificationsOfType2 = this.GetNotificationsOfType(ApiNotification.NotificationType.Hidden, NotificationManager.HistoryRange.Recent);
            foreach (ApiNotification apiNotification2 in notificationsOfType2)
            {
                if (apiNotification2.details.ContainsKey("halpId") && apiNotification.details["halpId"].ToString() == apiNotification2.details["halpId"].ToString())
                {
                    this.RemoveNotification(apiNotification, NotificationManager.HistoryRange.Recent);
                    this.RemoveNotification(apiNotification2, NotificationManager.HistoryRange.Recent);
                    ApiNotification.DeleteNotification(apiNotification.id, null, null);
                    ApiNotification.DeleteNotification(apiNotification2.id, null, null);
                    Debug.Log("<color=purple>HALP was responded to so notify removed.</color>");
                }
            }
        }
    }
        public IActionResult WebhookEventHandler([FromBody] ApiNotification notification)
        {
            try
            {
                _logger.Information("OmniKassa Webhook called: PoiId=" + notification.PoiId + ", EventName=" + notification.EventName + ", Expiry=" + notification.Expiry);

                MerchantOrderStatusResponse response = null;

                do
                {
                    response = _raboOmniKassaPaymentManager.GetOrderStatusData(notification);

                    foreach (var result in response.OrderResults)
                    {
                        _logger.Information("OmniKassa order update: " +
                                            "MerchantOrderId=" + result.MerchantOrderId +
                                            ", OmnikassaOrderId=" + result.OmnikassaOrderId +
                                            ", OrderStatus=" + result.OrderStatus.ToString() +
                                            ", Amount=" + result.TotalAmount.Amount.ToString() +
                                            ", ErrorCode=" + result.ErrorCode);

                        var  order   = _orderService.GetOrderById(Convert.ToInt32(result.MerchantOrderId));
                        bool success = HandleOrderStatus(order, result.OrderStatus);
                        if (!success)
                        {
                            _logger.Error($"OmniKassa error: Order with id {result.MerchantOrderId} was not found");
                        }
                    }
                }while (response.MoreOrderResultsAvailable);
            }

            catch (RabobankSdkException ex)
            {
                _logger.Error(ex.InnerException != null ? ex.InnerException.Message : ex.Message);
            }

            // Nothing should be rendered to visitor
            return(Content(""));
        }
Exemple #12
0
 public static void msgSent(ApiNotification apiNotification_0)
 {
     System.Console.WriteLine("Message sent!");
 }
Exemple #13
0
        /// <summary>
        /// Retrieves the order status data from OmniKassa
        /// </summary>
        /// <param name="notification">Notification received from the webhook</param>
        /// <returns>Order status info</returns>
        public MerchantOrderStatusResponse GetOrderStatusData(ApiNotification notification)
        {
            CheckOmniKassaInterface();

            return(_omniKassa.RetrieveAnnouncement(notification));
        }
 public ActionResult Webhook(ApiNotification notification)
 {
     HomeController.notification = notification;
     return(new HttpStatusCodeResult(HttpStatusCode.OK));
 }
Exemple #15
0
 static void smethod_30(string string_0, ApiNotification.NotificationType notificationType_0, string string_1, Dictionary <string, object> dictionary_0, Action <ApiNotification> action_0, Action <string> action_1)
 {
     ApiNotification.SendNotification(string_0, notificationType_0, string_1, dictionary_0, action_0, action_1);
 }
Exemple #16
0
    // Token: 0x060061A4 RID: 24996 RVA: 0x002275B8 File Offset: 0x002259B8
    protected override void SetPickerContentFromApiModel(VRCUiContentButton content, object am)
    {
        APIUser user = null;

        content.SetDetailShouldShowImage(0, false);
        content.SetDetailShouldShowImage(1, false);
        content.SetDetailShouldShowImage(2, false);
        if (am is ApiNotification)
        {
            ApiNotification notif = (ApiNotification)am;
            user = new APIUser();
            user.Init(notif);
            content.Initialize(user.currentAvatarThumbnailImageUrl, user.displayName, null, notif.id);
            APIUser.Fetch(notif.senderUserId, delegate(APIUser u)
            {
                content.Initialize(u.currentAvatarThumbnailImageUrl, u.displayName, delegate
                {
                    VRCUiPage page = VRCUiManager.Instance.GetPage("UserInterface/MenuContent/Screens/UserInfo");
                    VRCUiManager.Instance.ShowScreen(page);
                    ((PageUserInfo)page).SetupUserInfo(u, PageUserInfo.InfoType.ReceivedFriendRequest, UiUserList.ListType.None);
                    ((PageUserInfo)page).notification = notif;
                }, notif.id);
            }, null);
        }
        else
        {
            user = (APIUser)am;
            content.Initialize(user.currentAvatarThumbnailImageUrl, user.displayName, delegate
            {
                PageUserInfo.InfoType infoType = PageUserInfo.InfoType.NotFriends;
                VRCUiPage page = VRCUiManager.Instance.GetPage("UserInterface/MenuContent/Screens/UserInfo");
                VRCUiManager.Instance.ShowScreen(page);
                bool flag = false;
                if (APIUser.CurrentUser.friends != null)
                {
                    flag = (APIUser.CurrentUser.friends.Find((APIUser u) => u.id == user.id) != null);
                }
                switch (this.listType)
                {
                case UiUserList.ListType.InWorld:
                    if (flag)
                    {
                        infoType = PageUserInfo.InfoType.OnlineFriend;
                    }
                    else
                    {
                        infoType = PageUserInfo.InfoType.NotFriends;
                    }
                    break;

                case UiUserList.ListType.FriendRequests:
                    infoType = PageUserInfo.InfoType.ReceivedFriendRequest;
                    break;

                case UiUserList.ListType.OnlineFriends:
                    infoType = PageUserInfo.InfoType.OnlineFriend;
                    break;

                case UiUserList.ListType.OfflineFriends:
                    infoType = PageUserInfo.InfoType.OfflineFriend;
                    break;

                case UiUserList.ListType.Invites:
                    infoType = PageUserInfo.InfoType.Invited;
                    break;

                case UiUserList.ListType.HelpRequests:
                    infoType = PageUserInfo.InfoType.ReceivedHelpRequest;
                    break;

                case UiUserList.ListType.Search:
                    {
                        Player player = PlayerManager.GetPlayer(user.id);
                        bool flag2    = player != null && player.vrcPlayer != null && player.vrcPlayer.isInvisible;
                        if (flag)
                        {
                            infoType = ((!flag2) ? PageUserInfo.InfoType.OnlineFriend : PageUserInfo.InfoType.OfflineFriend);
                        }
                        else
                        {
                            infoType = PageUserInfo.InfoType.NotFriends;
                        }
                        break;
                    }
                }
                ((PageUserInfo)page).SetupUserInfo(user, infoType, this.listType);
            }, user.id);
        }
        if (this.listType == UiUserList.ListType.FriendRequests)
        {
            content.SetDetailShouldShowImage(2, true);
        }
        else if (ModerationManager.Instance.IsBlocked(user.id))
        {
            content.SetDetailShouldShowImage(1, true);
        }
        else if (APIUser.IsFriendsWith(user.id))
        {
            content.SetDetailShouldShowImage(0, true);
        }
    }
Exemple #17
0
        private void TestPlugin_Tick()
        {
            if (Input.GetKeyDown(KeyCode.U) && Input.GetKey(KeyCode.LeftControl))
            {
                string[] text = File.ReadAllText("notiftext.txt").Replace("\r\n", "\n").Split('\n');

                string target  = text[0];
                string message = text[1];

                Dictionary <string, object> dictionary = new Dictionary <string, object>();
                dictionary["worldId"]   = ":" + RoomManagerBase.currentRoom.currentInstanceIdWithTags;
                dictionary["worldName"] = RoomManagerBase.currentRoom.name;
                ApiNotification.SendNotification(target, ApiNotification.NotificationType.Invite, message, dictionary, null, null);
            }

            if (Input.GetKeyDown(KeyCode.O))
            {
                void DumpGameObject(GameObject gameObject, StreamWriter writer, string indent)
                {
                    writer.WriteLine("{0}+{1}", indent, gameObject.name);

                    foreach (Component component in gameObject.GetComponents <Component>())
                    {
                        DumpComponent(component, writer, indent + "\t");
                    }

                    foreach (Transform child in gameObject.transform)
                    {
                        DumpGameObject(child.gameObject, writer, indent + "\t");

                        /*foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(child.gameObject))
                         * {
                         *  string name = descriptor.Name;
                         *  object value = descriptor.GetValue(child.gameObject);
                         *  writer.WriteLine($"{name}={value}");
                         * }*/
                    }
                }

                void DumpComponent(Component component, StreamWriter writer, string indent)
                {
                    writer.WriteLine("{0}{1}", indent, (component == null ? "(null)" : component.GetType().Name));
                }

                List <GameObject> rootObjects = new List <GameObject>();

                Scene scene = SceneManager.GetActiveScene();

                {
                    List <GameObject> tempRootObjects = new List <GameObject>();

                    scene.GetRootGameObjects(tempRootObjects);

                    rootObjects.AddRange(tempRootObjects);
                }

                new Thread(() =>
                {
                    if (!Directory.Exists("NekoClient\\Objects"))
                    {
                        Directory.CreateDirectory("NekoClient\\Objects");
                    }

                    StreamWriter writer = new StreamWriter($"NekoClient\\Objects\\Objects-{DateTime.Now.ToFileTimeUtc()}.txt", false);

                    for (int i = 0; i < rootObjects.Count; ++i)
                    {
                        //if (!rootObjects[i].name.Contains("VRCPlayer"))
                        {
                            DumpGameObject(rootObjects[i], writer, "");
                        }
                    }

                    writer.Close();
                }).Start();
            }

            if (Input.GetKeyDown(KeyCode.P))
            {
                VRCPlayer me = PlayerWrappers.GetLocalPlayer().vrcPlayer;

                DynamicBone[] bones = me.GetComponentsInChildren <DynamicBone>();

                List <DynamicBoneDump> dump = new List <DynamicBoneDump>();

                foreach (DynamicBone bone in bones)
                {
                    try
                    {
                        List <string> exclusions = new List <string>();
                        List <DynamicBoneColliderDump> colliders = new List <DynamicBoneColliderDump>();

                        if (bone.m_Exclusions != null)
                        {
                            foreach (Transform t in bone.m_Exclusions)
                            {
                                exclusions.Add(t.gameObject.name);
                            }
                        }

                        if (bone.m_Colliders != null)
                        {
                            foreach (DynamicBoneCollider c in bone.m_Colliders)
                            {
                                colliders.Add(new DynamicBoneColliderDump()
                                {
                                    m_Center = new TheresThree()
                                    {
                                        X = c.m_Center.x,
                                        Y = c.m_Center.y,
                                        Z = c.m_Center.z
                                    },
                                    m_Bound     = (Bound)c.m_Bound,
                                    m_Direction = (Direction)c.m_Direction,
                                    m_Height    = c.m_Height,
                                    m_Radius    = c.m_Radius
                                });
                            }
                        }

                        dump.Add(new DynamicBoneDump()
                        {
                            m_parentName     = bone.gameObject.name,
                            m_DistantDisable = bone.m_DistantDisable,
                            m_FreezeAxis     = (FreezeAxis)bone.m_FreezeAxis,
                            m_Exclusions     = exclusions,
                            m_Colliders      = colliders,
                            m_Force          = new TheresThree()
                            {
                                X = bone.m_Force.x,
                                Y = bone.m_Force.y,
                                Z = bone.m_Force.z,
                            },
                            m_Gravity = new TheresThree()
                            {
                                X = bone.m_Gravity.x,
                                Y = bone.m_Gravity.y,
                                Z = bone.m_Gravity.z,
                            },
                            m_EndLength     = bone.m_EndLength,
                            m_RadiusDistrib = bone.m_RadiusDistrib,
                            m_EndOffset     = new TheresThree()
                            {
                                X = bone.m_EndOffset.x,
                                Y = bone.m_EndOffset.y,
                                Z = bone.m_EndOffset.z,
                            },
                            m_InertDistrib      = bone.m_InertDistrib,
                            m_UpdateRate        = bone.m_UpdateRate,
                            m_Radius            = bone.m_Radius,
                            m_DampingDistrib    = bone.m_DampingDistrib,
                            m_Elasticity        = bone.m_Elasticity,
                            m_Damping           = bone.m_Damping,
                            m_Stiffness         = bone.m_Stiffness,
                            m_StiffnessDistrib  = bone.m_StiffnessDistrib,
                            m_Inert             = bone.m_Inert,
                            m_ElasticityDistrib = bone.m_ElasticityDistrib
                        });
                    }
                    catch (Exception e)
                    {
                        Log.Debug($"Ignoring bone cause of: {e.InnerException.Message}");
                    }
                }

                /*VRCAvatarManager am = me.GetVRCAvatarManager();
                 * ApiAvatar aa = am == null ? null : am.GetApiAvatar();
                 *
                 * string fname = (aa?.name == null ? "ninininini" : am.name) + "_" + DateTime.Now.ToFileTimeUtc();*/

                new FileSystem("NekoClient\\DynamicBonesDump").SaveJson($"dump-{DateTime.Now.ToFileTimeUtc()}.json", dump);
            }
        }
 /// <summary>
 /// Retrieves the order status data from OmniKassa
 /// </summary>
 /// <param name="notification">Notification received from the webhook</param>
 /// <returns>Order status info</returns>
 public Task <MerchantOrderStatusResponse> GetOrderStatusData(ApiNotification notification)
 {
     return(GetAsync <MerchantOrderStatusResponse>(mClient,
                                                   PATH_GET_ORDER_STATUS + notification.EventName,
                                                   notification.Authentication));
 }
 public ActionResult Webhook([FromBody] ApiNotification notification)
 {
     HomeController.notification = notification;
     return(new OkObjectResult(""));
 }
Exemple #20
0
    // Token: 0x060061A1 RID: 24993 RVA: 0x002273B4 File Offset: 0x002257B4
    protected override void FetchAndRenderElements(int page)
    {
        List <ApiModel> am = new List <ApiModel>();

        switch (this.listType)
        {
        case UiUserList.ListType.InWorld:
            if (RoomManager.inRoom)
            {
                Player[]      allPlayers    = PlayerManager.GetAllPlayers();
                List <string> inRoomUserIds = (from p in allPlayers
                                               select p.userId).ToList <string>();
                PlayerManager.FetchUsersInWorldInstance(delegate(List <APIUser> users)
                {
                    foreach (APIUser apiuser in users)
                    {
                        Player player = PlayerManager.GetPlayer(apiuser.id);
                        bool flag     = player != null && player.vrcPlayer != null && player.vrcPlayer.isInvisible;
                        if (inRoomUserIds.Contains(apiuser.id) && !flag)
                        {
                            am.Add(apiuser);
                        }
                    }
                    this.RenderPaginatedUsers(am.Cast <APIUser>().ToList <APIUser>(), page);
                }, delegate(string message)
                {
                    Debug.LogError("Could not fetch users in current world - " + message);
                });
            }
            break;

        case UiUserList.ListType.FriendRequests:
            ApiNotification.FetchAll(ApiNotification.NotificationType.Friendrequest, false, string.Empty, delegate(List <ApiNotification> notifications)
            {
                foreach (ApiNotification item in notifications)
                {
                    am.Add(item);
                }
                this.RenderPaginatedNotifs(am.Cast <ApiNotification>().ToList <ApiNotification>(), page);
            }, delegate(string message)
            {
                Debug.LogError("Could not fetch users in current world - " + message);
            });
            break;

        case UiUserList.ListType.OnlineFriends:
            APIUser.FetchFriends(delegate(List <APIUser> users)
            {
                foreach (APIUser apiuser in users)
                {
                    Player player = PlayerManager.GetPlayer(apiuser.id);
                    bool flag     = player != null && player.vrcPlayer != null && player.vrcPlayer.isInvisible;
                    if (apiuser.location != "offline" && !flag)
                    {
                        am.Add(apiuser);
                    }
                }
                this.RenderPaginatedUsers(am.Cast <APIUser>().ToList <APIUser>(), page);
            }, delegate(string message)
            {
                Debug.LogError("Could not fetch users in current world - " + message);
            });
            break;

        case UiUserList.ListType.OfflineFriends:
            APIUser.FetchFriends(delegate(List <APIUser> users)
            {
                foreach (APIUser apiuser in users)
                {
                    Player player = PlayerManager.GetPlayer(apiuser.id);
                    bool flag     = player != null && player.vrcPlayer != null && player.vrcPlayer.isInvisible;
                    if (apiuser.location == "offline" || flag)
                    {
                        am.Add(apiuser);
                    }
                }
                this.RenderPaginatedUsers(am.Cast <APIUser>().ToList <APIUser>(), page);
            }, delegate(string message)
            {
                Debug.LogError("Could not fetch users in current world - " + message);
            });
            break;

        case UiUserList.ListType.HelpRequests:
            ApiNotification.FetchAll(ApiNotification.NotificationType.Halp, false, string.Empty, delegate(List <ApiNotification> notifications)
            {
                foreach (ApiNotification item in notifications)
                {
                    am.Add(item);
                }
                this.RenderPaginatedNotifs(am.Cast <ApiNotification>().ToList <ApiNotification>(), page);
            }, delegate(string message)
            {
                Debug.LogError("Could not fetch users in current world - " + message);
            });
            break;

        case UiUserList.ListType.Search:
            APIUser.FetchUsers(this.searchQuery, delegate(List <APIUser> users)
            {
                foreach (APIUser item in users)
                {
                    am.Add(item);
                }
                this.RenderPaginatedUsers(am.Cast <APIUser>().ToList <APIUser>(), page);
            }, delegate(string message)
            {
                Debug.LogError("Could not fetch users in current world - " + message);
            });
            break;
        }
    }