communicate: route MSRP typing stanzas to the typing tracker
- Commit
cb1aa05b2bb04177855be84e20ed9dec91476f50- Author
- Vayun Mathur <[email protected]>
- When
- 2026-11-07 14:40 UTC (29 days ago)
- Parents
03c3e62
handleMsrpChunk tested the chunk content type for the substring 'im-composing', but the wire type this app itself sends (RcsTyping) is application/im-iscomposing+xml, which does not contain that substring. An inbound typing stanza over an MSRP session therefore fell through to the message path and was cached (and notified) as a chat message containing raw isComposing XML, instead of updating the typing indicator. parseInbound already handles this by falling back to parseIsComposingBody on the body; handleMsrpChunk now does the same. Found by SyncServiceRcsPass3Test, which failed on the typing assertion before this fix. (cherry picked from commit 2cd48a76367c713142773fb7898232e818618916)
Diff
communicate/src/main/java/com/vayunmathur/communicate/telephony/RcsSyncService.kt
diff --git a/communicate/src/main/java/com/vayunmathur/communicate/telephony/RcsSyncService.kt b/communicate/src/main/java/com/vayunmathur/communicate/telephony/RcsSyncService.ktindex ff9326d87c..0e4b5ffcd0 100644--- a/communicate/src/main/java/com/vayunmathur/communicate/telephony/RcsSyncService.kt+++ b/communicate/src/main/java/com/vayunmathur/communicate/telephony/RcsSyncService.kt@@ -321,7 +321,12 @@ class RcsSyncService : Service() { RcsImdn.onReportReceived(text) return }- if (contentType.contains("im-composing", ignoreCase = true)) {+ // The wire type is application/im-iscomposing+xml, which does not+ // contain the substring "im-composing"; like parseInbound, fall back+ // to sniffing the body so typing stanzas are not cached as messages.+ if (contentType.contains("im-composing", ignoreCase = true) ||+ parseIsComposingBody(text) != null+ ) { RcsSessionManager.onSipRequest("MESSAGE", session.callId, conversationId, contentType, text) return }