Example #1
0
        void CreateMailboxIfNotExist(ClaimsPrincipal userInfo)
        {
            var userId = userInfo.Id();

            if (!_messageSource.ExistsForUser(userId))
            {
                var user = _userSource.Get(userId);
                var box  = new MessageBox
                {
                    UserId   = userId,
                    Messages = new Dictionary <string, IMessage>()
                };
                _messageSource.Create(box);
            }
        }