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

Use DisplayScreenName when sending an evil notification #43

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

jgknight
Copy link
Contributor

Summary

According to OSCAR docs we should be sending the formatted screen name in the evil notification snac. Also we were incorrectly sending the warning level of recipient instead of the sender in the sender's TLVUserInfo block.

Testing Done

Before Fix
Sending a warning would result in the unformatted screen name appearing in the warning dialog. Also bots like smartersmarterchild would be unable to find the chat context for warnings received during conversations with formatted screen names.

After Fix
The formatted name appears in the warning dialog. Also smartersmarterchild can now correctly keep track of the incoming warning to the chat context it was received with.

The updated unit test passes, and the rest of the repo unit tests also pass.

=== RUN   TestICBMService_EvilRequest/transmit_anonymous_warning_from_sender_to_recipient
    /Users/josh/code/retro-aim-server/foodgroup/mock_buddy_broadcaster_test.go:211: PASS:       BroadcastBuddyArrived(string,mock.argumentMatcher)
    /Users/josh/code/retro-aim-server/foodgroup/mock_message_relayer_test.go:154: PASS: RetrieveByScreenName(state.IdentScreenName)
    /Users/josh/code/retro-aim-server/foodgroup/mock_message_relayer_test.go:154: PASS: RelayToScreenName(string,state.IdentScreenName,wire.SNACMessage)
    /Users/josh/code/retro-aim-server/foodgroup/mock_feedbag_manager_test.go:417: PASS: BlockedState(state.IdentScreenName,state.IdentScreenName)
--- PASS: TestICBMService_EvilRequest/transmit_anonymous_warning_from_sender_to_recipient (0.00s)

According to OSCAR docs we should be sending the formatted screen name
in the evil notification snac.  Also we were incorrectly sending the
warning level of recipient instead of the sender in the sender's
TLVUserInfo block.
@mk6i mk6i merged commit 92b6d8a into mk6i:main Jun 21, 2024
1 check passed
@jgknight jgknight deleted the fix-evil-screenname-format branch June 21, 2024 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants