mautrix / signal

A Matrix-Signal puppeting bridge
GNU Affero General Public License v3.0
484 stars 74 forks source link

Thread replies to thread messages #512

Open madduck opened 1 month ago

madduck commented 1 month ago

Hello,

When I reply to a bridged event in a Matrix thread, the bridge sends that as normal replies, because Signal doesn't do threads. So it looks like this:

Matrix:                    Signal:

Original message           Original message
├─> My Reply 1             └─> My Reply 1
├─> My Reply 2             My Reply 1
└─> My Reply 3             └─> My Reply 2
                           My Reply 2
                           └─> My Reply 3

This is as good as it gets with Signal's lack of threads. Thanks for implementing this.

However, if the other side replies to a threaded reply, the message is not threaded. For instance, if the other side replies first to my "Reply 2" and then to my "Reply 1", this is what Matrix (Element) shows

My Reply 2
└─> Their Reply 4
My Reply 1
└─> Their Reply 5

I assume that the bridge actually can find out that Replies 1 & 2 are threaded, and then I'd expect the bridge to insert the replies into the thread, thus producing:

Original message
├─> My Reply 1
├─> My Reply 2
├─> My Reply 3
├─> Their Reply 4
└─> Their Reply 5

Would this be possible?