You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a follow up to #267, I've documented some left over cleanup items that mostly pre-existed in the codebase before that calendar migration PR.
Consider removing unused commands
There are a few commands that, to my knowledge, are never used. Either because they are outside of the purpose of the plugin, or they require meticulous datetime formatting in the command arguments. Here are some that I noticed:
case "createcal":
case "createevent":
case "deletecal":
case "findmeetings":
case "showcals":
case "events":
case "avail":
case "subscribe":
case "unsubscribe":
We'll want to delete these from the processed commands, and command autocomplete.
In the EventResponder struct, there are 4 methods. One of the methods RespondToEvent essentially implements the other three, and those other three methods are never called and so are dead code. The methods not being called should be removed.
Document how the status sync job works. It's currently not obvious how the timing window stuff works at the code block below. It should be clear how big the window is and how close by to the event we want to calculate certain things.
upcomingEventNotificationWindow= (StatusSyncJobInterval*11) /10// 110% of the interval
logTruncateMsg="We've truncated the logs due to too many messages"
logTruncateLimit=5
)
Logging in the renew job is excessive - We create a log message for every connected user whenever the renew job runs. We should consider the value in this. Maybe we should only log on error logging during renew job seems overkill
As a follow up to #267, I've documented some left over cleanup items that mostly pre-existed in the codebase before that calendar migration PR.
There are a few commands that, to my knowledge, are never used. Either because they are outside of the purpose of the plugin, or they require meticulous datetime formatting in the command arguments. Here are some that I noticed:
We'll want to delete these from the processed commands, and command autocomplete.
EventResponder
struct, there are 4 methods. One of the methodsRespondToEvent
essentially implements the other three, and those other three methods are never called and so are dead code. The methods not being called should be removed.mattermost-plugin-mscalendar/calendar/engine/event_responder.go
Lines 10 to 15 in 1de44d0
mattermost-plugin-mscalendar/calendar/engine/availability.go
Lines 21 to 29 in 1de44d0
mattermost-plugin-mscalendar/calendar/jobs/renew_job.go
Lines 31 to 34 in 1de44d0
pluginBot
instead ofmscalendarBot
mattermost-plugin-mscalendar/calendar/plugin/plugin.go
Line 175 in 1de44d0
The text was updated successfully, but these errors were encountered: