Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XMPPFramework - Getting repeated messages

I'm using the XMPPFramework for iOS.

My problem is that when I join a room, then leave it, and join it again I get messages from that room, or private messages within that room twice, If I leave it and join it again I receive then 3 times, and so on.

I've been told that I might be registering multiple delegates and not removing them, but If I'm doing that I'm doing it accidentally and I'm not really sure where is this happening. Could anyone help finding where is this happening? Maybe an example would help me finding it in my code.

Thanks.

like image 474
subharb Avatar asked Feb 21 '23 19:02

subharb


1 Answers

Just in case someone likes to know.

The right way to leave a room is to do this set of functions:

    [xmppRoom leaveRoom];
    [xmppRoom deactivate];
    [xmppRoom removeDelegate:self];
like image 99
subharb Avatar answered Mar 08 '23 00:03

subharb