RakambdaOrg / ChannelPointsMiner

Watch Twitch streams and earn channel points
GNU Affero General Public License v3.0
67 stars 11 forks source link

Add `read-all-notifications` ws type to avoid errors #780

Closed Ravendwyr closed 3 months ago

Ravendwyr commented 3 months ago

Pull Request Etiquette

Checklist

Type of change

"Bug fix"

Description

This PR adds support for a read-all-notifications websocket message that is sent/received when clicking the envelope icon in the notifications menu to mark any unread notifications as read. Previously this would cause an exception for an unhandled message type. This change at the very least suppresses this.

Rakambda commented 3 months ago

Thanks. Is it possible to add a test? You can basically copy paste https://github.com/RakambdaOrg/ChannelPointsMiner/blob/a05c38b867a16265b22ae5d1b4d9fe5798e56928/miner/src/test/java/fr/rakambda/channelpointsminer/miner/api/ws/TwitchPubSubWebSocketClientMessageTest.java#L772 and adapt set the new message type in the payload.

Ravendwyr commented 3 months ago

Test added. Sorry about that, I missed that! I think I did it right?