We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c4ff83 commit 8f9706eCopy full SHA for 8f9706e
tinodesdk/src/main/java/co/tinode/tinodesdk/Topic.java
@@ -1829,12 +1829,12 @@ public int msgRecvCount(int seq) {
1829
*/
1830
public int msgReadCount(int seq) {
1831
int count = 0;
1832
- if (seq > 0) {
1833
- String me = mTinode.getMyId();
+ String me = mTinode.getMyId();
+ if (seq > 0 && me != null) {
1834
Collection<Subscription<SP, SR>> subs = getSubscriptions();
1835
if (subs != null) {
1836
for (Subscription sub : subs) {
1837
- if ((sub.user == null || !sub.user.equals(me)) && sub.read >= seq) {
+ if (!me.equals(sub.user) && sub.read >= seq) {
1838
count++;
1839
}
1840
0 commit comments