07794669c830341a018e01f7bd470ecc255c166b — Stephen Paul Weber 3 years ago 2ef55ec
Use type=chat so that carbons will relay to all target resources

It turns out that the Carbons spec says you should only use carbons for "IM
like" things, such as messages of type=chat or with a body.  So there was a case
where if you had XEP0353-supporting clients connected but they had a lower
priority than other clients that were connected, the server would send those
clients the proposal message and carbons would not kick in and nothing would

So now we use type=chat. Even though it's not a chat, it's not in the context of
your chat, it's just an inbound phone call. But that's a moral question and in
practise this is also what Conversations does and it fixes the problem.

Thanks so much to psycotica0 for all of the investigation work that lead to this
1 files changed, 1 insertions(+), 1 deletions(-)

M gateway.hs
M gateway.hs => gateway.hs +1 -1
@@ 167,7 167,7 @@ main = do
							bounceStanza (XMPP.ReceivedIQ iq) from fullToJid
						_ -> do
							liftIO $ Cache.insert sessionInitiates sid iq
							XMPP.putStanza $ (XMPP.emptyMessage XMPP.MessageNormal) {
							XMPP.putStanza $ (XMPP.emptyMessage XMPP.MessageChat) {
									XMPP.messageID = Just $ s"proposal%" ++ sid,
									XMPP.messageTo = Just to,
									XMPP.messageFrom = Just from,