Get badges with empty d tag using alternate method#4
Open
heguro wants to merge 4 commits intoverbiricha:masterfrom
Open
Get badges with empty d tag using alternate method#4heguro wants to merge 4 commits intoverbiricha:masterfrom
heguro wants to merge 4 commits intoverbiricha:masterfrom
Conversation
a7e11f7 to
d125807
Compare
Owner
|
Hey @heguro thanks a lot. I recently did some changes to the badges suscription code and moved it to useBadges so this PR needs updating. Will merge after is updated, lgtm. |
brb.io returns anything when used filter like it
Contributor
Author
|
Thanks for replying @verbiricha! I updated, and also covered things that I missed. |
Owner
|
Hey @heguro sorry for the delay reviewing this, looks good but found a small bug. Now that we are passing the full event instead of just id we need to update --- a/src/lib/Badges.js
+++ b/src/lib/Badges.js
@@ -59,10 +59,10 @@ function Awarded({ awarded, accepted, pubkey }) {
<Flex flexDirection="column" className="badge-list">
{awarded.map(({ badge, award }) => {
const d = findTag(badge.tags, "d");
- const atag = `${badge.kind}:${badge.pubkey}:${d}`;
+ const atag = `${badge.kind}:${badge.pubkey}:${d ? d : ""}`;
const accept = [
["a", atag],
- ["e", award],
+ ["e", award.id],
];
async function acceptBadge() {
const ev = { |
Contributor
Author
|
@verbiricha Updated. Thank you for finding it I missed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
brb.io) returns anything when used filter like this.I understand that this is an extreme edge case, but a few do exist.