예제 #1
0
        private static void RestorePollFromDb(int messageId, HockeyChat chat)
        {
            var poll = _db.GetPollByMessageId(messageId);

            if (poll == null)
            {
                return;
            }

            chat.Polls.Add(poll);

            poll.Votes = _db.GetVotesByMessageId(messageId);
            Console.WriteLine("Poll restored from DB: " + poll.Question);
        }