mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-09 22:04:34 -05:00
Fix websocket token (#1766)
This commit is contained in:
@@ -155,7 +155,10 @@ class ApolloSubscriptionProtocolHandler(
|
||||
): Flow<SubscriptionOperationMessage> {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val user =
|
||||
context.getAttributeOrSet(Attribute.TachideskUser) {
|
||||
context.getAttributeOrSet(
|
||||
Attribute.TachideskUser,
|
||||
replaceIf = { it == UserType.Visitor },
|
||||
) {
|
||||
val payload = operationMessage.payload as? Map<String, Any?>
|
||||
val token = payload?.let { it[Header.AUTHORIZATION] as? String }
|
||||
getUserFromToken(token)
|
||||
|
||||
Reference in New Issue
Block a user