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

Friendship Helper #24

Open
7 of 10 tasks
Joannis opened this issue Jun 4, 2021 · 0 comments
Open
7 of 10 tasks

Friendship Helper #24

Joannis opened this issue Jun 4, 2021 · 0 comments
Labels
documentation Improvements or additions to documentation example helper tests

Comments

@Joannis
Copy link
Member

Joannis commented Jun 4, 2021

Friendship

  • Block Users
  • Add as Friend
  • Remove as Friend
  • Block & Unblock
  • Can Ignore group communication by blocked users
  • Can prevent sending disallowed messages

Block

  • Client-Side Support
  • Server-Side Support
  • Disable Push by non-Friends (Server)
  • Client-Side Transport Hook (notify Server)

Tests

Test 1

When FriendshipRuleset.ignoreWhenUndecided == true, block all plugins down the line from communication.

  1. Create chat
  2. Don't add friends
  3. Send message(s)
  4. Neither Side sees the message, sender fails to send

Test 2

When FriendshipRuleset.blockAffectsGroupChats == true, doesn't block normal group communication

  1. Create group chat
  2. Start chatting
  3. Both parties can chat normally in the group

Test 3

FriendshipRuleset.blockAffectsGroupChats == true blocks blocked users

  1. Create group chat
  2. Start chatting
  3. Both parties can chat normally in the group
  4. Either party blocks the other
  5. New group messages don't arrive

Test 4

With FriendshipRuleset.ignoreWhenUndecided == true

  1. Create chat
  2. Add friends
  3. Chatting works
  4. User A blocks user B
  5. Can't chat
  6. User B blocks User A
  7. Can't chat still
  8. Both parties unblock each other (don't explicitly reclaim friendship)
  9. Parties resume chatting normally

Test 5

With FriendshipRuleset.canIgnoreMagicPackets == true and custom plugin

  1. Create chat
  2. Add friends
  3. A sends Magic packet using custom plugin
  4. B's plugin receives message
  5. A blocks B
  6. A sends Magic packet using custom plugin
  7. B's plugin doesn't receive it

Test 5

With FriendshipRuleset.canIgnoreMagicPackets == false and custom plugin

  1. Create chat
  2. Add friends
  3. A sends Magic packet using custom plugin
  4. B's plugin receives message
  5. A blocks B
  6. A sends Magic packet using custom plugin
  7. B's plugin receives message
@Joannis Joannis added documentation Improvements or additions to documentation helper example tests labels Jun 4, 2021
@Joannis Joannis changed the title Block User on Server & Client Helper Friendship Helper Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation example helper tests
Projects
None yet
Development

No branches or pull requests

1 participant