Skip to content
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

Community creation should set SocialDB profile metadata #98

Open
frol opened this issue Mar 2, 2024 · 0 comments
Open

Community creation should set SocialDB profile metadata #98

frol opened this issue Mar 2, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@frol
Copy link
Collaborator

frol commented Mar 2, 2024

Currently, create_community function does not set SocialDB profile information and so you need to call update_community in order to actually get it set:

social_db_contract().with_unused_gas_weight(1).set(json!({
get_devhub_community_account(&community.handle): {
"profile": {
"name": community.name,
"image": {
"url": community.logo_url,
},
"linktree": {
"twitter": community.twitter_handle,
"github": community.github_handle,
"telegram": community.telegram_handle,
"website": format!("near.social{community_page_link}"),
},
"description": format!("{}\n\nLearn more about our community [on DevHub]({}).", community.description, community_page_link),
"backgroundImage": {
"url": community.banner_url,
},
"tags": {
"community": "",
"announcements": "",
&community.handle: "",
}
}
},
get_devhub_discussions_account(&community.handle): {
"profile": {
"name": format!("{} (Community Discussions)", community.name),
"image": {
"url": community.logo_url,
},
"linktree": {
"twitter": community.twitter_handle,
"github": community.github_handle,
"telegram": community.telegram_handle,
"website": format!("near.social{community_page_link}"),
},
"description": format!("{}\n\nLearn more about our community [on DevHub]({}).", community.description, community_page_link),
"backgroundImage": {
"url": community.banner_url,
},
"tags": {
"community": "",
"discussions": "",
&community.handle: "",
}
}
}
}));

Since users update their community information after creation anyway, it is not a big deal, but we may still want to fix it eventually.

@frol frol added bug Something isn't working good first issue Good for newcomers labels Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant