Browse Source

Fix invalid field name

pull/1907/head
Gabe Kangas 3 years ago
parent
commit
21b82ebb2c
No known key found for this signature in database
GPG Key ID: 9A56337728BC81EA
  1. 2
      core/chat/persistence.go

2
core/chat/persistence.go

@ -309,7 +309,7 @@ func SetMessageVisibilityForUserID(userID string, visible bool) error { @@ -309,7 +309,7 @@ func SetMessageVisibilityForUserID(userID string, visible bool) error {
// Get a list of IDs to send to the connected clients to hide
ids := make([]string, 0)
query := fmt.Sprintf("SELECT messages.id, user_id, body, title, subtitle, image, link, eventType, hidden_at, timestamp, display_name, display_color, created_at, disabled_at, previous_names, namechanged_at, authenticated, scopes, type FROM messages INNER JOIN users ON messages.user_id = users.id WHERE user_id IS '%s'", userID)
query := fmt.Sprintf("SELECT messages.id, user_id, body, title, subtitle, image, link, eventType, hidden_at, timestamp, display_name, display_color, created_at, disabled_at, previous_names, namechanged_at, authenticated_at, scopes, type FROM messages INNER JOIN users ON messages.user_id = users.id WHERE user_id IS '%s'", userID)
messages := getChat(query)
if len(messages) == 0 {

Loading…
Cancel
Save