Don't send whitespace tags if contact is offline
Offline messages are a standard XMPP feature. When a user comes online and has messages waiting for them with whitespace tags appended, their client initiates an OTR session (opening a window on the sender side) even though a response may not be forthcoming.
This may be more of a mismatch between OTR and the async messaging model.
Couple other things I noticed. The comment for @is_logged_in@ says,
/* Report whether you think the given user is online. Return 1 if * you think he is, 0 if you think he isn't, -1 if you're not sure. * * If you return 1, messages such as heartbeats or other * notifications may be sent to the user, which could result in "not * logged in" errors if you're wrong. */
But the only place it seems to be used is the disconnect message. And the test there is,
ops->is_logged_in && ops->is_logged_in(opdata, context->accountname, context->protocol, context->username) == 1
Maybe it should be,
!ops->is_logged_in || ops->is_logged_in(opdata, context->accountname, context->protocol, context->username) != 0
(from redmine: created on 2015-06-27)