Skip to content

Commit

Permalink
Fix history traversal a second time ...
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfonso Acosta committed Aug 15, 2016
1 parent 054dc0d commit c57cafb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions main.go
Expand Up @@ -148,9 +148,7 @@ func (a arriba) retrieveChannelStandup(c conversation) (channelStandup, error) {
history.Messages[len(history.Messages)-1].Msg.Timestamp,
history.Messages[0].Msg.Timestamp, history.Latest, c.getID())

// Messages are increasingly ordered by time, traverse them in reverse order
for i := range history.Messages {
msg := history.Messages[len(history.Messages)-1-i]
for _, msg := range history.Messages {
if _, ok := cstandup[msg.User]; ok {
// we already have the latest standup message for this user
continue
Expand Down

0 comments on commit c57cafb

Please sign in to comment.