Closed roman-yagodin closed 7 years ago
Need to see, especially this new post id is buried quite deep.
Added another SubmitExternalPost with IsPinned as a new parameter
Wow, thanks for IsPinned
- you are very kind! It will sure help with creating new forum post to discuss from external source!
About new post id: it could be resolved by returning some structure (or class) like that:
public struct SubmitPostResult
{
public int PostId;
public PostMessage PostMessage;
}
It can be extended in the future to have more fields to return. But surely it looks like major change in API.
Similar approach could be applied to pass parameters to SubmitExternalPost()
:
public struct SubmitPostParams
{
public int TabId;
public int ModuleId;
public int ForumId;
public int UserId;
...
public List<Term> Terms;
}
public SubmitPostResult SubmitExternalPost (SubmitPostParams postParams);
That was my idea as well, but yes, there is lots of places where this is checked. Need to review this carefully.
Did a quick refactoring, see with this https://github.com/juvander/DotNetNuke-Forum/releases/tag/05.01.00_DNN8
Thanks, I'll check it.
Seems to work as intended.
Excellent!
Some nice things to have in public API:
IsPinned
then callingSubmitExternalPost()
- currently alwaysFalse
, andPostValidation()
method is private.PostToDatabase()
returns it, but it also private and heavily wrapped inPostValidation()
.