Skip to content

Commit 7d99d30

Browse files
committed
Fix based on review
1 parent ee89630 commit 7d99d30

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

mm-go-irckit/service.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func login(u *User, toUser *User, args []string, service string) {
215215
//nolint:funlen,gocognit,gocyclo,cyclop
216216
func replay(u *User, toUser *User, args []string, service string) {
217217
if len(args) == 0 || len(args) > 2 {
218-
u.MsgUser(toUser, "need REPLAY (#<channel>|<user>)")
218+
u.MsgUser(toUser, "need REPLAY (#<channel>)")
219219
u.MsgUser(toUser, "e.g. REPLAY #bugs")
220220
return
221221
}
@@ -228,7 +228,7 @@ func replay(u *User, toUser *User, args []string, service string) {
228228
channelID := u.br.GetChannelID(channelName, channelTeamID)
229229
brchannel, err := u.br.GetChannel(channelID)
230230
if err != nil {
231-
logger.Errorf("%s not found", channelName)
231+
u.MsgUser(toUser, "%s not found", channelName)
232232
return
233233
}
234234

@@ -238,7 +238,7 @@ func replay(u *User, toUser *User, args []string, service string) {
238238
return
239239
}
240240

241-
// exclude direct messages
241+
// create a spoof function (DM channels are replayed as PMs via createSpoof's "__" special-case)
242242
spoof := u.createSpoof(brchannel)
243243

244244
logSince := "server"
@@ -247,7 +247,7 @@ func replay(u *User, toUser *User, args []string, service string) {
247247
channame = fmt.Sprintf("#%s", brchannel.Name)
248248
}
249249

250-
// We used to stored last viewed at if present.
250+
// We used to store last viewed at if present.
251251
var lastViewedAt int64
252252
key := brchannel.ID
253253
err = u.lastViewedAtDB.View(func(tx *bolt.Tx) error {

mm-go-irckit/userbridge.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,7 @@ func (u *User) addUserToChannelWorker(channels <-chan *bridge.ChannelInfo, throt
689689
}
690690

691691
args := []string{brchannel.Name, brchannel.TeamID}
692+
692693
replay(u, u, args, "")
693694

694695
if !u.v.GetBool(u.br.Protocol() + ".disableautoview") {

0 commit comments

Comments
 (0)