EionRobb / purple-discord

A libpurple/Pidgin plugin for Discord
GNU General Public License v3.0
382 stars 43 forks source link

Blocked messages not hidden? #62

Open Chromace opened 7 years ago

Chromace commented 7 years ago

Is it possible to hide messages from blocked users?

Currently, they're shown just like any other ones in a chat.

alyssarosenzweig commented 7 years ago

Is the API endpoint for blocked user status known? Otherwise, I wonder if Pidgin's built in blocking support works here?

Chromace commented 7 years ago

Hm...Pidgin's "right-click -> ignore" function certainly works in chat rooms, though that seems to only last as long as said user is present, and only works with users who present themselves as available.

There doesn't appear to be a way to find blocked user statuses from Discord's documentation. Though I only briefly skimmed through it, so I may be wrong. But then how does Discord block messages...?

EionRobb commented 7 years ago

Blocked users show in the "READY" response of relationships as a relationship type 2. Interestingly, the "RELATIONSHIP_ADD" also gets triggered with the type:2 when adding to the block list, and "RELATIONSHIP_REMOVE" with type:2 gets triggered when unblocking

EionRobb commented 7 years ago

The changes in https://github.com/EionRobb/purple-discord/commit/509f384fbd701d9095ceb5d33c7755f8549f260f should sort out what you're after, @Chromace Can you give it a try?

Chromace commented 7 years ago

Hm...I attempted to block a message through Discord's official client, but that didn't appear to register in Pidgin.