element-hq / element-android

A Matrix collaboration client for Android.
https://element.io/
GNU Affero General Public License v3.0
3.34k stars 711 forks source link

Getting custom keys onTimeline updated Snapshot[SDK] #8834

Open mdhanif-simformsolutions opened 4 months ago

mdhanif-simformsolutions commented 4 months ago

Description

I am adding a some custom keys to my message content while sending event, now when I get the message in my onTimeLineUpdated Listener there the custom keys are getting removed if the message is a reply to another message.

For eg :- I am replying to a message with custom key as attachment which is list of custom data type. Here's my json which I send :-

"{m.relates_to={m.in_reply_to={event_id=eventId}}, attachments=[{info={mtype=m.image, name=Happy Birthday GIF by Rodney Dangerfield.image/gif, size=0, type=image/gif}, url={content_uri=attachmentUrlHere}}], body=, msgtype=m.text, formatted_body=}"

Now, when I get this in onTimelinUpdate it removes attachments key from the object but when I try to get the TimeLineEvent with :- roomService?.getRoom(roomId)?.getTimelineEvent(id) it gives me all the things in my response.

Also in my message if I change m.relates_to to any other key like m.attachment_relates_to then it works and give all the things as expected.

It only happens in Android Sdk, other then that iOS, Web and others work fine.

mdhanif-simformsolutions commented 3 months ago

Hello, is there any update on this or did you get a chance to work on this.