Skip to content

Commit

Permalink
don't skip 'sys' subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Jun 11, 2021
1 parent 25dac67 commit e95e8fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/db/mysql/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -1478,8 +1478,8 @@ func (a *adapter) TopicsForUser(uid t.Uid, keepDeleted bool, opts *t.QueryOpt) (
sub.User = uid.String()
tcat := t.GetTopicCat(tname)

if tcat == t.TopicCatMe || tcat == t.TopicCatFnd || tcat == t.TopicCatSys {
// One of 'me', 'fnd', 'sys' subscriptions, skip.
if tcat == t.TopicCatMe || tcat == t.TopicCatFnd {
// One of 'me', 'fnd' subscriptions, skip. Don't skip 'sys' subscription.
continue
} else if tcat == t.TopicCatP2P {
// P2P subscription, find the other user to get user.Public
Expand All @@ -1492,7 +1492,7 @@ func (a *adapter) TopicsForUser(uid t.Uid, keepDeleted bool, opts *t.QueryOpt) (
topq = append(topq, tname)

} else {
// Group subscription. Maybe convert channel name to topic name.
// Group or 'sys' subscription. Maybe convert channel name to topic name.
tname = t.ChnToGrp(tname)
topq = append(topq, tname)
}
Expand Down

0 comments on commit e95e8fb

Please sign in to comment.