@@ 1675,8 1675,10 @@ groupTextPorcelein host m@(Message { messagePayloads = p, messageFrom = Just fro
Just fromTel <- strNode <$> jidNode from,
Just tels <- fmap (textToString fromTel:) $ mapM (fmap uriPath . parseURI . textToString <=< attributeText (s"uri")) uris =
let
+ fromTxt = fromString (intercalate "," (sort tels)) ++ (s"@") ++ host
addresses' = addresses { elementNodes =
(XML.NodeElement (XML.Element (s"{http://jabber.org/protocol/address}address") [(s"type", [s"ofrom"]), (s"jid", [XML.ContentText $ fromTel ++ s"@" ++ host])] [])) :
+ (XML.NodeElement (XML.Element (s"{http://jabber.org/protocol/address}address") [(s"type", [s"replyto"]), (s"jid", [XML.ContentText $ fromTxt])] [])) :
concatMap (\el ->
if null $ isNamed (s"{http://jabber.org/protocol/address}address") el then [XML.NodeElement el] else
maybe [] (\attrs -> [XML.NodeElement $ el { elementAttributes = attrs }]) $ sequence $ map (\(attr, content) ->
@@ 1691,7 1693,7 @@ groupTextPorcelein host m@(Message { messagePayloads = p, messageFrom = Just fro
in
Just $ m {
messageTo = Just to,
- messageFrom = parseJID (fromString (intercalate "," (sort tels)) ++ (s"@") ++ host),
+ messageFrom = parseJID fromTxt,
messagePayloads =
body' :
addresses' :