We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I've lost some hours trusting the TypeScript annotation.
The return type should say string|undefined.
string|undefined
matrix-js-sdk/src/models/event.ts
Lines 350 to 356 in 67b8da7
btw. I didn't get this on a m.presence but on a m.bad.encrypted:
m.presence
m.bad.encrypted
MatrixEvent { _events: [Object: null prototype] { 'Event.decrypted': [ [Function: forSource], [Function] ], 'Event.replaced': [Function: forSource] }, _eventsCount: 2, _maxListeners: undefined, event: { content: { algorithm: 'm.olm.v1.curve25519-aes-sha2', sender_key: '8LgWTZ5yFIawz80ylkAl1Mc9BX1oUZGAAAl3z0E7lXM', ciphertext: [Object] }, type: 'm.room.encrypted', sender: '@jaller94:localhost' }, pushActions: { notify: true, tweaks: { highlight: false } }, _replacingEvent: null, _localRedactionEvent: null, _isCancelled: false, clearEvent: { type: 'm.room.message', content: { msgtype: 'm.bad.encrypted', body: '** Unable to decrypt: Not included in recipients **' } }, senderCurve25519Key: null, claimedEd25519Key: null, forwardingCurve25519KeyChain: [], untrusted: false, _decryptionPromise: null, retryDecryption: false, txnId: null, thread: null, localTimestamp: NaN, sender: null, target: null, status: null, error: null, forwardLooking: true, verificationRequest: null, reEmitter: ReEmitter { target: [Circular *1] }, [Symbol(kCapture)]: false }
The text was updated successfully, but these errors were encountered:
This sounds more like a bug on m.bad.encrypted's side than a typescript type omission.
Sorry, something went wrong.
Still, the JSDoc of the method says:
Get the room_id for this event. This will return undefined for m.presence events.
undefined
strictNullChecks: true
No branches or pull requests
I've lost some hours trusting the TypeScript annotation.
The return type should say
string|undefined
.matrix-js-sdk/src/models/event.ts
Lines 350 to 356 in 67b8da7
btw. I didn't get this on a
m.presence
but on am.bad.encrypted
:The text was updated successfully, but these errors were encountered: