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

Fix message replies in e2e threads #57

Merged
merged 1 commit into from
May 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions msgconv/to-whatsapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ func (mc *MessageConverter) ToWhatsApp(
var meta waMsgApplication.MessageApplication_Metadata
if replyTo := mc.GetMetaReply(ctx, content); replyTo != nil {
meta.QuotedMessage = &waMsgApplication.MessageApplication_Metadata_QuotedMessage{
StanzaID: replyTo.ReplyMessageId,
RemoteJID: mc.GetData(ctx).JID().String(),
StanzaID: replyTo.ReplyMessageId,
// TODO: this is hacky since it hardcodes the server
// TODO 2: should this be included for DMs?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tulir does this clear this TODO?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not, the TODO is for the Participant field

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh actually it might clear the second one if you've confirmed DMs are supposed to have that field. I think on WhatsApp the same field is meant for groups (and RemoteJID is used for DM recipient or group ID)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the screenshot in the PR description it seems that the Participant field is indeed required.

Participant: types.JID{User: strconv.FormatInt(replyTo.ReplySender, 10), Server: types.MessengerServer}.String(),
Expand Down