async Task <int> FetchNewMessages(IChatMessageOptions options, CancellationToken token)
        {
            IEnumerable <IChatMessage> messages = null;
            int count = 0;

            if (!token.IsCancellationRequested)
            {
                await ssFetch.WaitAsync(token);

                try
                {
                    messages = await GitterApi.GetChatMessages(ChatRoom.Id, options);

                    if (messages is object)
                    {
                        count = messages.Count();
                        if (!string.IsNullOrWhiteSpace(options.BeforeId))
                        {
                            Messages.InsertRange(0, RemoveDuplicates(Messages, messages));
                        }
                        else
                        {
                            Messages.AddRange(RemoveDuplicates(Messages, messages));
                        }

                        await Invoke(StateHasChanged);

                        await Task.Delay(1);
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine($"RoomMessages.FetchNewMessages: {e.GetBaseException().Message}");
                }
                finally
                {
                    ssFetch.Release();
                }
            }
            return(count);

            IEnumerable <IChatMessage> RemoveDuplicates(IEnumerable <IChatMessage> Existing, IEnumerable <IChatMessage> Merging)
            {
                IEnumerable <string> ExistingIds = Existing.Select(m => m.Id);

                return(Merging.Where(m => !ExistingIds.Contains(m.Id)));
            }
        }