Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
cammellos authored and flexsurfer committed Nov 6, 2020
1 parent 6f207de commit 8966d81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions protocol/message_persistence.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ func (db sqlitePersistence) MessagesByIDs(ids []string) ([]*common.Message, erro
func (db sqlitePersistence) MessageByChatID(chatID string, currCursor string, limit int) ([]*common.Message, string, error) {
cursorWhere := ""
if currCursor != "" {
cursorWhere = "AND cursor <= ?"
cursorWhere = "AND cursor <= ?" //nolint: goconst
}
allFields := db.tableUserMessagesAllFieldsJoin()
args := []interface{}{chatID}
Expand Down Expand Up @@ -536,7 +536,7 @@ func (db sqlitePersistence) MessageByChatID(chatID string, currCursor string, li
func (db sqlitePersistence) MessageByChatIDs(chatIDs []string, currCursor string, limit int) ([]*common.Message, string, error) {
cursorWhere := ""
if currCursor != "" {
cursorWhere = "AND cursor <= ?"
cursorWhere = "AND cursor <= ?" //nolint: goconst
}
allFields := db.tableUserMessagesAllFieldsJoin()
args := make([]interface{}, len(chatIDs))
Expand Down
3 changes: 1 addition & 2 deletions protocol/messenger.go
Original file line number Diff line number Diff line change
Expand Up @@ -2600,9 +2600,8 @@ func (m *Messenger) MessageByChatID(chatID, cursor string, limit int) ([]*common
}
}
return m.persistence.MessageByChatIDs(chatIDs, cursor, limit)
} else {
return m.persistence.MessageByChatID(chatID, cursor, limit)
}
return m.persistence.MessageByChatID(chatID, cursor, limit)
}

func (m *Messenger) SaveMessages(messages []*common.Message) error {
Expand Down

0 comments on commit 8966d81

Please sign in to comment.