Skip to content

Commit fe519e8

Browse files
committed
fixing comments
1 parent 60bd1c1 commit fe519e8

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

server/db/adapter.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,17 @@ type Adapter interface {
115115
OwnTopics(uid t.Uid) ([]string, error)
116116
// ChannelsForUser loads a slice of topic names where the user is a channel reader and notifications (P) are enabled.
117117
ChannelsForUser(uid t.Uid) ([]string, error)
118-
// TopicShare creates topc subscriptions
118+
// TopicShare creates topic subscriptions.
119119
TopicShare(subs []*t.Subscription) error
120-
// TopicDelete deletes topic, subscription, messages
120+
// TopicDelete deletes topic, subscriptions, messages.
121121
TopicDelete(topic string, isChan, hard bool) error
122122
// TopicUpdateOnMessage increments Topic's or User's SeqId value and updates TouchedAt timestamp.
123123
TopicUpdateOnMessage(topic string, msg *t.Message) error
124124
// TopicUpdate updates topic record.
125125
TopicUpdate(topic string, update map[string]any) error
126126
// TopicOwnerChange updates topic's owner
127127
TopicOwnerChange(topic string, newOwner t.Uid) error
128+
128129
// Topic subscriptions
129130

130131
// SubscriptionGet reads a subscription of a user to a topic

server/db/mongodb/adapter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,7 +1821,7 @@ func (a *adapter) ChannelsForUser(uid t.Uid) ([]string, error) {
18211821
return names, err
18221822
}
18231823

1824-
// TopicShare creates topic subscriptions
1824+
// TopicShare creates topic subscriptions.
18251825
func (a *adapter) TopicShare(subs []*t.Subscription) error {
18261826
// Assign Ids.
18271827
for i := 0; i < len(subs); i++ {
@@ -1847,7 +1847,7 @@ func (a *adapter) TopicShare(subs []*t.Subscription) error {
18471847
return nil
18481848
}
18491849

1850-
// TopicDelete deletes topic, subscription, messages
1850+
// TopicDelete deletes topic, subscriptions, messages.
18511851
func (a *adapter) TopicDelete(topic string, isChan, hard bool) error {
18521852
filter := b.M{}
18531853
if isChan {

server/db/mysql/adapter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2039,7 +2039,7 @@ func (a *adapter) TopicShare(shares []*t.Subscription) error {
20392039
return tx.Commit()
20402040
}
20412041

2042-
// TopicDelete deletes specified topic.
2042+
// TopicDelete deletes topic, subscriptions, messages.
20432043
func (a *adapter) TopicDelete(topic string, isChan, hard bool) error {
20442044
ctx, cancel := a.getContextForTx()
20452045
if cancel != nil {

server/db/postgres/adapter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1935,7 +1935,7 @@ func (a *adapter) TopicShare(shares []*t.Subscription) error {
19351935
return tx.Commit(ctx)
19361936
}
19371937

1938-
// TopicDelete deletes specified topic.
1938+
// TopicDelete deletes topic, subscriptions, messages.
19391939
func (a *adapter) TopicDelete(topic string, isChan, hard bool) error {
19401940
ctx, cancel := a.getContextForTx()
19411941
if cancel != nil {

server/db/rethinkdb/adapter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,7 @@ func (a *adapter) TopicShare(shares []*t.Subscription) error {
15641564
return err
15651565
}
15661566

1567-
// TopicDelete deletes topic.
1567+
// TopicDelete deletes topic, subscriptions, messages.
15681568
func (a *adapter) TopicDelete(topic string, isChan, hard bool) error {
15691569
var err error
15701570
if err = a.subsDelForTopic(topic, isChan, hard); err != nil {

0 commit comments

Comments
 (0)