~singpolyma/cheogram-smtp

bffd1d933d5f4e07bc916bb2eb8caa07ce68be18 — Stephen Paul Weber 2 years ago 9ec1e1e
Actually send the IQ with the defaulted id

Instead of just writing it down and then sending with no id...
1 files changed, 4 insertions(+), 4 deletions(-)

M IQManager.hs
M IQManager.hs => IQManager.hs +4 -4
@@ 32,10 32,9 @@ iqSenderUnexceptional :: (Unexceptional m) =>
	   TVar ResponseMap
	-> XMPP.IQ
	-> m (STM (Maybe XMPP.IQ))
iqSenderUnexceptional responseMapVar iq = do
iqSenderUnexceptional responseMapVar iqToSend = do
	timeout <- fromIO_ $ newDelay iqSendTimeoutMicroseconds
	iqResponseVar <- atomicUIO newEmptyTMVar
	iqToSend <- iqDefaultID iq
	atomicUIO $ modifyTVar' responseMapVar $
			Map.insert (XMPP.iqID iqToSend) iqResponseVar
	return (


@@ 48,8 47,9 @@ iqSender ::
	  (XMPP.IQ -> XMPP.XMPP a)
	-> XMPP.IQ
	-> XMPP.XMPP a
iqSender baseSender iqToSend
	| XMPP.iqType iqToSend `elem` [XMPP.IQGet, XMPP.IQSet] = do
iqSender baseSender iq
	| XMPP.iqType iq `elem` [XMPP.IQGet, XMPP.IQSet] = do
		iqToSend <- iqDefaultID iq
		result <- baseSender iqToSend
		XMPP.putStanza iqToSend
		return result