-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change repost
action to align with twitter Recsys
#31
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when you quote_post
, checking post_type
is also needed.
@@ -428,8 +429,8 @@ async def repost(self, agent_id: int, post_id: int): | |||
} | |||
|
|||
post_type_result = self.pl_utils._get_post_type(post_id) | |||
post_insert_query = ("INSERT INTO post (user_id, original_post_id)" | |||
"VALUES (?, ?)") | |||
post_insert_query = ("INSERT INTO post (user_id, original_post_id" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, the current_time
is added, what would post["content"]
be ? "None"
?
@@ -4,7 +4,7 @@ CREATE TABLE post ( | |||
post_id INTEGER PRIMARY KEY AUTOINCREMENT, | |||
user_id INTEGER, | |||
original_post_id INTEGER, -- NULL if this is an original post | |||
content TEXT, | |||
content TEXT DEFAULT '', -- DEFAULT '' for initial posts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Redtides0 I changed the default value of content as a empty string. I think this might be a more convenient way to implementat it? WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
understood, LGTM.
In the current main branch code, there is already a discussion on the classification of post types, so I did not modify the |
Ahh, my apologies for the initial oversight. After a more thorough review, I can confirm that everything is now in order. |
After discussing with @Redtides0 , I modified some details of the
repost
action implementation and default field in database to make it more compatible with Twitter's recommendation algorithm.