Skip to content
New issue

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

Encrypted messages are in format m4a and are silently not processed #2

Open
remoremorali opened this issue Nov 20, 2023 · 6 comments
Open

Comments

@remoremorali
Copy link

The code checks for audio/ogg before decoding, so audio/m4a is ignored.
I'm going to submit a PR for this.

@remoremorali
Copy link
Author

Actually I got it wrong: some messages are ogg and some are m4a but the problem with the encrypted messages is that the content_type is application/octet-stream.
The event mimetype is correct though, so using that one works.

@alexander-potemkin
Copy link

@remoremorali , I'm facing an issue with encrypted audio message not processed at all, so I guess it's exactly the issue you are mentioning.
Did you have a chance to submit a PR? If not, would you mind advising on the code place to make the changes?

@alexander-potemkin
Copy link

I figured out pull request is there and already merged (#3).

@hibobmaster , could you please, help me to understand if encrypted rooms ever worked for you? I have only Element clients and bot just doesn't get triggered on audio messages in encrypted rooms.

I have encryption configured and working, non-encrypted rooms also works fine.

@alexander-potemkin
Copy link

I've changed events to listen to as broad range as possible:

        # setup event callbacks
        self.client.add_event_callback(
            self.message_callback,
            (
                RoomMessageAudio,
                RoomEncryptedAudio,
                RoomMessage,
                RoomMessageUnknown,
                RoomEncryptedMedia,
                UnknownEncryptedEvent,
                Event,
            ),
        )

But it still doesn't work - I'm running the code under the debugger and it just not executing this code for encrypted rooms.

One more thing that concerns me, it's that bot never 'read' those messages - it's like something prevents it from getting those messages ever touch the code.

... and one more thing... it's not only with encrypted channels - it's with any channels, except for default's '#discuss'. The bot joining all those rooms, but never get the messages.

@hibobmaster
Copy link
Owner

@alexander-potemkin You should import E2EE room keys follow the readme.

And here's a guide about how to login via access_token and make it work in E2EE room. #4 (comment)

@alexander-potemkin
Copy link

@hibobmaster , thank you - I've commented on #4 regarding session key.
What confuse me, it's that things doesn't work on un-ecrypted room as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants