cheogram

created pr with cheogram/resource-fix.1 on 2026-11-19T17:15:58Z · by 3c31bc8c
commented on 2026-11-19T17:16:02Z · by 3c31bc8c
http://tangled.org/mrry.band/cheogram resource-fix
cmds
checkout latest patchset:
ssh pr.pico.sh pull cheogram:resource-fix | git am -3
checkout specific patchset revision:
ssh pr.pico.sh pull cheogram:resource-fix [rev] | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh cheogram:resource-fix
add comment to patch request:
ssh pr.pico.sh comment cheogram:resource-fix "lgtm!"

Patchset cheogram/resource-fix.1 on 2026-11-19T17:15:58Z · commit 7dfa464

Only append / if there's a resource
Eric Roberts 2026-11-19T17:13:14Z
Diff stat
Main.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Semantic diff summary
0 added, 0 modified, 0 signature changed, 0 removed across 0 analyzed files (1 file skipped: unsupported file type)
+1 -1 Main.hs #
......@@ -1621,7 +1621,7 @@ component db redis pushStatsd backendHost did maybeAvatar cacheOOB sendIQ iqRece
16211621 let (toResource, fromResource)
16221622 | Just toResource <- T.stripPrefix (s"CHEOGRAM%outbound-sip%") =<< (strResource <$> jidResource to) = (toResource, s"tel")
16231623 | otherwise = (fromMaybe mempty (strResource <$> jidResource to), s"sip:" ++ escapeJid (formatJID from))
1624- case (mapLocalpartToBackend (formatJID componentJid) =<< sanitizeSipLocalpart (maybe mempty strNode $ jidNode from), parseJID (unescapeJid localpart ++ s"/" ++ toResource)) of
1624+ case (mapLocalpartToBackend (formatJID componentJid) =<< sanitizeSipLocalpart (maybe mempty strNode $ jidNode from), parseJID (unescapeJid localpart ++ if T.null toResource then mempty else s"/" ++ toResource)) of
16251625 (Just componentFrom, Just routeTo) -> liftIO $ do
16261626 Just componentFromSip <- return $ parseJID (formatJID componentFrom ++ s"/" ++ fromResource)
16271627 sendToComponent $ mkStanzaRec $ receivedStanza $ receivedStanzaFromTo componentFromSip routeTo stanza
Back to top