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

Support for attachments #9

Open
chagai95 opened this issue Mar 5, 2024 · 13 comments
Open

Support for attachments #9

chagai95 opened this issue Mar 5, 2024 · 13 comments
Labels
enhancement New feature or request

Comments

@chagai95
Copy link

chagai95 commented Mar 5, 2024

If I understand correctly attachments are not supported, would be nice to support them, what does that entail?

@grvn-ht
Copy link

grvn-ht commented Apr 4, 2024

Hey @chagai95 ,
I also noticed it and wanted to work on it, @HerHde did someone already start something?
++

@chagai95
Copy link
Author

chagai95 commented Apr 4, 2024

We at fairkom didn't really start, we only tried understanding the problem, if you want we can show you what we learned but we're still too confused to say something clear. Feel free to reach out maybe on matrix? @me:chagai.website

@HerHde
Copy link
Collaborator

HerHde commented Apr 4, 2024

I don't know of anyone working on this, either. Great to hear that you want to tackle it together 👍

@pierreozoux
Copy link

I'm working on it right now.
(but we have only object store, so I'll support only this case)

@grvn-ht
Copy link

grvn-ht commented Apr 8, 2024

I started citation messages
@pierreozoux are images also in object store?

@pierreozoux
Copy link

@grvn-ht yes they are.

FYI: I'm get inspiration from:
https://github.com/Worteks/RC2Matrix/blob/main/rc2matrix.py#L441-L557

@pierreozoux
Copy link

preliminary work is available here (sorry, no ts expert here :/ ):
https://github.com/pierreozoux/rocketchat2matrix/tree/file-upload

Are you currently working on citations @grvn-ht ?

@grvn-ht
Copy link

grvn-ht commented Apr 9, 2024

I also did some work here:
https://github.com/grvn-ht/rocketchat2matrix/tree/attachement-reply
I would also like to mark all messages as read (otherwise when people get to their new account they will push button "mark all as read" and it makes synapse server very slow, lots of timeout ... then it is unusable for some time
Does someone has idea on it?
#11

@chagai95
Copy link
Author

@pierreozoux hello, thx for making us aware of this great python script! May I ask why did you decide to not just use the python script directly, we are also no ts experts and we were wondering why not use the python script...

@pierreozoux
Copy link

pierreozoux commented Apr 15, 2024

@chagai95 this is a bit out of the subject of this issue, but the structure in different files and functions here is more appealing, and also the usage of an sqlite database to restart migration are 2 really nice things! (and there are tests here :) )

@HerHde HerHde added the enhancement New feature or request label Jun 17, 2024
@flying-scorpio
Copy link

@pierreozoux I'm interested in this as well. For testing, I applied your commit on the (updated) main branch, and it seems to do the job.
What are the missing parts needed for turning this into a PR do you think? I'm happy to start based on your work.

@flying-scorpio
Copy link

flying-scorpio commented Jul 24, 2024

In rocketchat you can add a description to an upload and it appears as a text message along with the upload. But in Matrix this isn't possible, so I've changed the attachment handling to send a separate message using the description if there is one, otherwise the description was ignored and the resulting message was lost.
But the attachment and its description are two separate events, and in my case it seems the client doesn't respect the timestamp when ordering messages. I'm not sure if this is a separate issue, but this happens with multiple clients I've tested. Is anyone else having issues with message ordering?

Edit: This seems expected: https://spec.matrix.org/v1.11/application-service-api/#timestamp-massaging
Edit2: It can be solved by removing the concurrency of message handling (flying-scorpio@22c43db) but I'm not sure we want this.

@flying-scorpio
Copy link

@pierreozoux I took the liberty to make a PR based on your commit.

[...] it seems the client doesn't respect the timestamp when ordering messages. I'm not sure if this is a separate issue, but this happens with multiple clients I've tested. Is anyone else having issues with message ordering?

The message ordering is resolved with #31.

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

No branches or pull requests

5 participants