Skip to content

handle*: support encrypted message requests properly#305

Merged
rnons merged 6 commits into
mainfrom
rnons/droid-79285
Jul 21, 2026
Merged

handle*: support encrypted message requests properly#305
rnons merged 6 commits into
mainfrom
rnons/droid-79285

Conversation

@rnons

@rnons rnons commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

No description provided.

rnons added 3 commits July 21, 2026 08:43
Previously incoming notifications that a pending message request
thread was deleted/declined were silently dropped. Treat them the
same as LSDeleteThread and emit a chat delete event.
@rnons
rnons requested a review from tulir July 21, 2026 02:29
Comment thread pkg/messagix/lightspeed/decode_test.go Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This test looks fairly useless

Comment thread pkg/connector/handlemeta.go Outdated
}
if waKey, ok := tm.m.hybridThreadMap.Get(fbKey); ok {
return waKey
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this map actually needed? If it's only for LSDeletePartialThread, just let it fall back to the db instead of maintaining a separate cache

Comment thread pkg/connector/events.go Outdated
Comment on lines +285 to +291
fbThreadKey, messageRequest, err := evt.m.Main.DB.GetHybridThreadInfoByJID(ctx, evt.m.UserLogin.ID, metaid.ParseFBPortalID(evt.GetPortalKey().ID))
if err != nil {
zerolog.Ctx(ctx).Warn().Err(err).Msg("Failed to restore hybrid thread info")
} else if fbThreadKey != 0 {
info.MessageRequest = ptr.Ptr(messageRequest)
info.ExtraUpdates = bridgev2.MergeExtraUpdaters(info.ExtraUpdates, setFBThreadKey(fbThreadKey))
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks like it should be inside makeWADirectChatInfo?

Comment thread pkg/connector/capabilities.go Outdated
case table.ENCRYPTED_OVER_WA_ONE_TO_ONE:
if meta.FBThreadKey != 0 {
return metaCapsWithE2EDelete
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Capabilities don't need to differentiate this unless there are legitimate cases where we won't have the FB thread key

@tulir tulir changed the title connector: support deleting fb msg request and e2ee chat handle*: support encrypted message requests properly Jul 21, 2026

func (m *MetaConnector) GetBridgeInfoVersion() (info, caps int) {
return 1, 15
return 1, 16

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The cap ID should also be updated to actually have it resend

Comment thread pkg/metadb/00-latest-schema.sql Outdated
rnons and others added 2 commits July 21, 2026 22:47
Co-authored-by: Tulir Asokan <tulir@maunium.net>
@rnons
rnons merged commit 3cfe4de into main Jul 21, 2026
11 checks passed
@rnons
rnons deleted the rnons/droid-79285 branch July 21, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants