~singpolyma/cheogram

92a11aa654bceb04841e3b742bb6c5185edc74f4 — Stephen Paul Weber 23 days ago 0eef81a
Pass through forwarded JIDs

Need to pass through here as well in case the command does more queries before
replying to fwdBy.
1 files changed, 1 insertions(+), 0 deletions(-)

M Main.hs
M Main.hs => Main.hs +1 -0
@@ 858,6 858,7 @@ componentStanza (ComponentContext { processDirectMessageRouteConfig, componentJi
			let fromLocalpart = maybe mempty (\localpart -> localpart++s"@") (fmap strNode . jidNode =<< iqFrom replyIQ)
			return [mkStanzaRec $ replyIQ {
				iqTo = if fmap bareTxt (iqTo replyIQ) == Just onBehalf then parseJID fwdBy else iqTo replyIQ,
				iqID = if iqType replyIQ == IQResult then iqID replyIQ else Just $ fromString $ show (fwdBy, onBehalf, iqID replyIQ),
				iqFrom = parseJID (fromLocalpart ++ formatJID componentJid ++ s"/CHEOGRAM%" ++ ConfigureDirectMessageRoute.nodeName)
			}]
componentStanza (ComponentContext { processDirectMessageRouteConfig, componentJid }) (ReceivedIQ iq@(IQ { iqTo = Just to, iqPayload = payload }))