Commit ac662b3
authored
feat(xmtp_mls,ffi): add membership_capabilities read surface for proposal migration (#3803)
## What
Adds `MlsGroup::membership_capabilities()` plus an FFI mirror and
iOS/Android SDK wrappers. It reports **generic per-installation MLS
capability facts** so apps can answer migration questions themselves:
- `context_extensions` — the extension types present in the group's
context.
- `members[].installations[].supported_extensions` — the extension types
each member installation advertises.
- `capabilities_known` — whether those facts could be determined (vs.
"advertises nothing").
## Why generic
Rather than bake in a proposals-specific answer, this surfaces raw facts
the app filters. For the proposal / app-data-dictionary migration
specifically:
- **already migrated?** → `context_extensions` contains
`AppDataDictionary`
- **eligible to migrate?** → every installation's `supported_extensions`
contains it
- **who's blocking?** → inboxes with an installation that doesn't
## Notes
- Remote installations' capabilities come from their **latest published
key package** (so a stale in-group leaf can't mask an upgraded client);
the local installation's come from its in-group leaf node.
- An installation whose key package can't be fetched/verified is
reported with `capabilities_known == false` rather than failing the
whole call. This matters: old clients — exactly what this surface exists
to flag — are the ones likely to lack a published key package, and
`fetch_key_packages` errors wholesale on any gap. So we try one batch
fetch, then fall back to **bounded** per-installation fetches that
tolerate gaps.
- The regenerated iOS `xmtpv3.swift` also drops the already-removed
`pendingSelfRemove` worker variant that the committed binding still
carried (source-faithful regen — the release workflow would do the
same).
## Mobile SDKs
Adds `Group.membershipCapabilities()` to the Swift (`XMTPiOS`) and
Kotlin (`org.xmtp.android`) SDKs, with `MlsExtensionType` /
`InstallationCapabilities` / `InboxCapabilities` /
`GroupMembershipCapabilities` mirror types.
🤖 Generated with [Claude Code](https://claude.com/claude-code)1 parent 58a583e commit ac662b3
8 files changed
Lines changed: 1192 additions & 8 deletions
File tree
- bindings/mobile/src
- crates/xmtp_mls/src/groups
- tests
- sdks
- android/library/src/main/java/org/xmtp/android/library
- libxmtp
- ios/Sources/XMTPiOS
- Libxmtp
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| |||
2212 | 2215 | | |
2213 | 2216 | | |
2214 | 2217 | | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
| 2221 | + | |
| 2222 | + | |
| 2223 | + | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
| 2286 | + | |
| 2287 | + | |
| 2288 | + | |
| 2289 | + | |
| 2290 | + | |
| 2291 | + | |
| 2292 | + | |
| 2293 | + | |
| 2294 | + | |
| 2295 | + | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
2215 | 2318 | | |
2216 | 2319 | | |
2217 | 2320 | | |
| |||
3032 | 3135 | | |
3033 | 3136 | | |
3034 | 3137 | | |
| 3138 | + | |
| 3139 | + | |
| 3140 | + | |
| 3141 | + | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
| 3149 | + | |
| 3150 | + | |
3035 | 3151 | | |
3036 | 3152 | | |
3037 | 3153 | | |
| |||
0 commit comments