Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce extra call to Mattermost server for files link #509

Merged
merged 1 commit into from
Nov 24, 2022

Conversation

hloeung
Copy link
Collaborator

@hloeung hloeung commented Nov 19, 2022

There is this extra and unnecessary API GET call to the Mattermost server for files links (/files/*/link). Messages with attached files is already handled in handleFileEvent() so no need for in handleWsActionPost().

m.eventChan <- event
if fileEvent.Sender == nil || fileEvent.Receiver == nil {
logger.Errorf("filedm: couldn't resolve sender or receiver: %#v", rmsg)
return
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Hide whitespace" makes this diff above easier to review, IMO.

@hloeung hloeung marked this pull request as ready for review November 19, 2022 23:59
@hloeung hloeung requested a review from 42wim November 22, 2022 22:08
@hloeung hloeung merged commit ed57df2 into 42wim:master Nov 24, 2022
@hloeung hloeung deleted the file-events-remove-extra branch November 24, 2022 08:55
@42wim 42wim added this to the v0.27.0 milestone Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants