Repository navigation
Conversation
Skip mention resolution when the rendered text has no @, project only the three verified name tags in SQL instead of parsing whole kind:30382 events, deduplicate folded aliases per member, try names only at mention anchors, and read verified names only where the community advertises verified profiles. Signed-off-by: Tom Brow <tomb@block.xyz>
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.
Follow-up to block#9624 (verified profile aliases in workflow mentions), targeting its branch.
block#9624 makes every workflow
send_messageload each channel member's full kind:30382 verified-profile event, parse it into anostr::Eventwhile holding the writer connection, and scan the message for about five times as many names, on a tokio worker. That cost lands on every workflow send, including ones that mention no one. It also reads verified names even when the community no longer advertises verified profiles, so leftover profile heads can make an ordinary@Nameambiguous after an operator turns the feature off.This keeps the same output tags and:
@. No@means noporbuzz:workflow-mentiontag can result, so the member and alias reads are skipped.display_name,username,full_name, the samejsonb_path_query_firstexpression profile search uses) instead of shipping and parsing whole events. Identical case-folded names for one member are deduplicated. A malformed head no longer fails the send.@at a left boundary once and matches each name only there, so its cost is names × mentions instead of names × characters. Matching rules are unchanged.verified_profiles::discoverycheck as profile search. Otherwise the heads join is skipped.Validation
workflow_send_message_binds_authority_to_authored_mentions): it now runs with verified profiles advertised, adds a message with no@, and repeats two cases on the same roster without the advertisement (@alexnotifies no one,@Alex Examplenotifies the ordinary member).Regressions
None expected. Output tags are identical for every advertised community. In a community that does not advertise verified profiles, workflow mentions fall back to ordinary names, which is what they matched before block#9624.