Assuming we have one message in the messageQueue If we call forget() TpQt emits pendingMessagesRemoved after it deletes it from the queue, so messageQueue.size() is 0. If we call acknowledge and removed in another client TpQt emits pendingMessagesRemoved before it deletes it from the queue, so messageQueue.size() is 1. (in TextChannel::Private::processMessageQueue()) From a personal POV it makes a lot more sense to me to delete it from the message queue first, in all my use cases of this signal it's used to update any notification of unread messages, on receipt of this signal I end up call messageQueue.size() which gives me +1 of what the message size will be by the time this signal finishes. Given the signal is called pendingMessageRemoved (emphasis on it being a past tense) I would have expected the removal to have already taken place.
Created attachment 57428 [details] [review] Patch for issue. Emit pendingMessagesRemoved after the pending message has actually been removed.
Under review
Approved
Committed as 5b2c18f732b512e539a3bf69c21420d719a20e0a, will be released in 0.9.1, thanks for your patch :)
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.