public Result Reply(Postkey currPost, Post post)
{
try
{
log.Info("got request to reply to post " + currPost);
if (!CheckPost(post))
return Result.ILLEGAL_POST;
Result res = securityManager.IsAuthorizedToPost(post.Key.Username, post.Subforum) ;
if (res == Result.OK)
if (dataManager.AddReply(post, currPost))
{
this.posted = post;
Notify();
return Result.OK;
}
else return Result.POST_NOT_FOUND;
else return res;
}
catch (Exception e)
{
log.Error("failed to reply to post " + currPost, e);
throw e;
}
}