Store RSS flag for wrapped blog posts.

This commit is contained in:
akwizgran
2017-04-13 15:23:08 +01:00
parent 46920f3bce
commit 2eeb2213e3
2 changed files with 3 additions and 0 deletions

View File

@@ -373,6 +373,7 @@ class BlogManagerImpl extends BdfIncomingMessageHook implements BlogManager,
// Re-wrap wrapped post without adding another wrapping layer
wMessage = blogPostFactory.rewrapWrappedPost(groupId, body);
meta.put(KEY_TYPE, WRAPPED_POST.getInt());
meta.put(KEY_RSS_FEED, pOriginalHeader.isRssFeed());
} else if (type == WRAPPED_COMMENT) {
BlogCommentHeader wComment = (BlogCommentHeader) pOriginalHeader;
MessageId wrappedId =

View File

@@ -201,6 +201,7 @@ class BlogPostValidator extends BdfMessageValidator {
// Get and Validate the Wrapped Message
Group wGroup = groupFactory
.createGroup(BlogManagerImpl.CLIENT_ID, descriptor);
Blog wBlog = blogFactory.parseBlog(wGroup);
BdfList wBodyList = BdfList.of(POST.getInt(), content, signature);
byte[] wBody = clientHelper.toByteArray(wBodyList);
Message wMessage =
@@ -213,6 +214,7 @@ class BlogPostValidator extends BdfMessageValidator {
meta.put(KEY_ORIGINAL_MSG_ID, wMessage.getId());
meta.put(KEY_TIMESTAMP, wTimestamp);
meta.put(KEY_AUTHOR, c.getDictionary().getDictionary(KEY_AUTHOR));
meta.put(KEY_RSS_FEED, wBlog.isRssFeed());
return new BdfMessageContext(meta);
}