-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add Like activity and ability to send a like #254
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.
How come you decided to go with the activity before the local version?
Also whats the story with c/sendlike |
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.
Overall very nice code. Just that one bit about global representation of a page, we can talk about that in the next meeting.
This has been updated 👍 c/sendlike was a version of this change where I moved the activities stuff into utils in the same commits. I decided it was too big and split it, did a new branch because everything was mashed together in the commits. |
def _create_actor_object(self, liker_handle): | ||
return { | ||
'type': 'Person', | ||
'host': self._hostname, |
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.
As far as I can tell this isn't a valid actor, as it has no ID. Why are you sending actors like this and not like the existing services? Why not send an ID like {host}/@{handle}
and parse it out at the other end?
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.
That's tru actually, changed 👍
|
||
message LikeDetails { | ||
int64 article_id = 1; | ||
string liker_handle = 3; |
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.
handle only refers to the bit before the @
(ie. bob
) in [email protected]
. Is this intentional?
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.
It's all that's really needed since a like will only be sent by a local user, I attach the hostname inside the service.
Connects to #217
Kind of chunky PR but it's a lot of boilerplate and tests for the servicer mostly.