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

MXLastMessage text and attributedText are always nil #1831

Open
ob1vansk1y opened this issue Nov 9, 2023 · 1 comment
Open

MXLastMessage text and attributedText are always nil #1831

ob1vansk1y opened this issue Nov 9, 2023 · 1 comment

Comments

@ob1vansk1y
Copy link

ob1vansk1y commented Nov 9, 2023

After start session I have tried to call all types of methods like session.fixRoomsSummariesLastMessage() also tried to reset it, but still those properties are always nil.

The only piece of code, that helped me to retrieve it is finding it by eventId. Could you, please tell the best way to retrieve it? Or what should be the correct flow of getting the room last message text

`private func getMessage() {
        session.event(withEventId: summary.lastMessage.eventId, inRoom: room.roomId) { response in
            guard let message = response.value?.content["body"] as? String else {
                self.lastMessageEvent = "No message"
                return
            }
            self.lastMessageEvent = message
        }
}`

Also, as a new user to Matrix SDK, with all respect to your team and developers, who left awesome comments in the project, I would like to ask you to improve the documentation for the SDK for iOS, since your repository is the only source of the information (except your comments on the code, which actually helped me a lot) and your console sample app is out of date and not supported and has not straightforward and easily understandable logic, which is really time consuming. It is not the best way to master your SDK for developers that way.

@NicolasBuquet
Copy link
Contributor

Same as #1782

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

2 participants