-
Notifications
You must be signed in to change notification settings - Fork 12
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
Trustgraph integration v1 #260
Conversation
there may be a desire to have the topic field be a Vec in case of wanting to filter by multiple topics, although that would make the weight sorting calculations a bit more involved. we could have topics associated with categories and place TrustAtoms on those as well. or there could be parameters and use some type of matrix weight equation, if a feature like that is desired |
Note: the word weight in the FeedMew field might cause a confusion somewhere since there is another weight that is used in HC and so we could consider renaming to trusted_weight or trust_atom_weight or some equivalent |
Linking in prior TrustGraph PRs in case they are helpful:
|
@dauphin3 looks like merge conflict got checked in: |
Update Cargo.lock Update Cargo.lock rm duplicates Update Cargo.lock Update Cargo.lock
aaf74ee
to
3ed6aa8
Compare
holo-dev-server | ||
|
||
Cargo.lock |
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.
we should keep the cargo lockfile in git
@@ -2,24 +2,28 @@ use hc_link_pagination::AgentPubKeyPagination; | |||
use hdk::prelude::*; | |||
|
|||
#[derive(Serialize, Deserialize, SerializedBytes, Clone, Debug)] | |||
#[serde(rename_all = "camelCase")] |
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.
I'm happy to have serde serialize input types to camelCase, but it should be consistent for all the input types. Maybe for now its simplest to just keep these as the snake_case serialization and then later make another PR to convert all input types to camelCase?
|
||
Ok(()) | ||
} | ||
|
||
#[hdk_extern] | ||
pub fn follow(agent: AgentPubKey) -> ExternResult<()> { | ||
pub fn follow(input: FollowInput) -> ExternResult<()> { |
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.
maybe all this logic should just be included in add_creator_for_follower()
, and we can keep follow()
as just an alias to it
sorry for the late review - this is awesome! I made some comments inline for minor cleanup. Would this work with cashtags as well, or just hashtags? Would you want to setup a call to go over this and figure out what's needed to get it integrated into the UI? |
Moved to branch in this repo: #261 |
using SweetTests
populates FeedMew with a weight and topic (hashtag) based on TrustGraph agent rating.
get_batch_mews_with_context_based_on_topic_and_weight_threshold() filters those mews containing the hashtagged topic and by minimum TrustAtom weight, sorted high to low