Esempio n. 1
0
        protected async Task MentionInterestedUsers(TagCommandParameters Command, Taglist SpecifiedTaglist)
        {
            ISet <TaglistRegisteredUser> InterestedUsers = SpecifiedTaglist.FilterByUsersInterestedIn(Command.Rating, Command.Categories);

            Log.Application_.LogVerbose("Mentioning {0} total users in response to Tag command for item '{1}'", InterestedUsers.Count, Command.ItemID);
            ISet <string> InterestedUsernames = (
                from U in InterestedUsers
                select U.Username
                ).ToHashSet();

            try{
                await Imgur.MentionUsers(Command.ItemID, Command.HostCommentID, InterestedUsernames);
            }catch (ImgurException Error) {
                Log.Application_.LogError(
                    "Error Mentioning users in Taglist '{1}' in response to the Tag command on the Imgur Gallery Item with ID '{0}'; users may have been partially Mentioned, consider re-Tagging the Gallery Item: {2}",
                    Command.ItemID, Command.TaglistName, Error.Message
                    );
                return;
            }
        }