Closed riandyrn closed 7 years ago
Hi Riandy,
{del what=topic}
will actually delete the topic for everybody if it's issued by the topic owner. Only the owner can delete the topic. {del what=topic}
issued by a non-owner, it's equivalent to {leave unsub=true}
{del what=topic}
can be issued without subscribing first while {leave unsub=true}
requires subscribing.Hoo…, ok (y)
So suppose we have p2p connection between user A & user B. Suppose user A delete its subscription by either using {del what=topic}
or {leave unsub=true}
. What supposed to happen in case of user B sending message to user A? Does user A still supposed to receive {pres}
packet from user B or not?
I found that sometimes in such case Tinode will still sent {pres}
packet to user A, but sometimes it doesn’t. So I would like to confirm which behavior is true in this case.
Once the subscription is deleted, neither messages no pres should go through. I know pres sometimes goes through and it's a bug.
I fixed the p2p issue with unnecessary {pres} being sent or needed not sent : https://github.com/tinode/chat/commit/543a530740c65bb85e8a2bb60c415446a18d5783
I think there is still an issue with presence being sent or not sent in p2p topics when the P permission is changed. I think it's rare enough. I'll fix it later.
Ok, thanks a lot, Gene. It's clear now (y)
Hello, Gene
I have question regarding
{del what=topic}
&{leave unsub=true}
. Are these both functions basically done something equivalent?I noticed that these both functions basically deleting user subscription. Maybe the only difference is when we use
{leave}
we must already subscribed to the topic while{del}
is not. So is my understanding correct?Thanks