get_about_info()
returns incorrect values #31
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: golgi-ssb/golgi#31
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When
get_about_info(ssb_id)
is given a recently-createdssb_id
(ie. a fairly new profile), the correct information is returned. However, the same method returns incorrect data when given anssb_id
representing an older profile with many interactions.Examples
The filter on
get_about_message_stream(ssb_id)
seems to be broken. The stream seemingly returns all messages for the given ID.The culprit:
L77 of
src/messages.rs
:The
matches!
macro does not match to the level of the variant of the enums being tested, only to the top-level of the type. Sincemtype
andmessage_type
areSsbMessageContentType
,matches!
will always return true, even if the variants are different. Ie.SsbMessageContentType::About
andSsbMessageContentType::Vote
are considered a match.TIL.
And the final fix:
We need to add the
about_val
check. This ensures that we only returnabout
messages that are actually about thessb_id
(not just authored by thessb_id
). Previously we were returning allabout
messages involvingssb_id
(even those which were about something else).Patched in PR#32.