Fix client sending chat_session_update when local UUID does not match UUID on server (#1237)

Co-authored-by: Frej Alexander Nielsen <frej@valoks.com>
This commit is contained in:
Frej Alexander Nielsen 2023-07-14 22:21:06 +02:00 committed by GitHub
parent 05e5a701f0
commit 5a64f14359
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,7 @@ module.exports = function (client, options) {
client.once('login', () => {
const mcData = require('minecraft-data')(client.version)
if (mcData.supportFeature('useChatSessions') && client.profileKeys && client.cipher) {
if (mcData.supportFeature('useChatSessions') && client.profileKeys && client.cipher && client.session.selectedProfile.id === client.uuid.replace(/-/g, '')) {
client._session = {
index: 0,
uuid: uuid.v4fast()