feat(mattermost): add Mattermost connector - #1466
Conversation
🚀 Preview Deployment
Preview will be automatically removed when this PR is closed. |
There was a problem hiding this comment.
All reported issues were addressed across 53 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| supersededAt: integer('superseded_at', { mode: 'timestamp_ms' }), | ||
| versionGroupId: text('version_group_id'), | ||
| source: text('source', { enum: MESSAGE_SOURCES }), | ||
| mattermostPostId: text('mattermost_post_id'), |
There was a problem hiding this comment.
This links a Mattermost answer thumbs up/down to its nao message so reaction feedback is saved against the correct message.
Basically, buttons look bad on mattermost, so I wanted to avoid having 2 for thumbs up/down which is why I found a way to store feedback via reactions on the message
There was a problem hiding this comment.
I don't think we should do an exception in the data model to put mattermost in the chatMessage table
There was a problem hiding this comment.
oh yeah fair enough, but so should we just not have reactions in Mattermost or use the very bad looking buttons?
There was a problem hiding this comment.
i did not see the bad looking buttons this morning :/
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
|
|
||
| void pingLicensesServer(); | ||
| void slackService.startSocketModeForAllProjects(); | ||
| void mattermostService.startForAllProjects(); |
There was a problem hiding this comment.
Is it really necessary? shouldn't it be a reactive route instead?
There was a problem hiding this comment.
Mattermost’s outgoing webhooks do not provide the full event flow we need, especially DMs, mentions, threads, and reactions.
So we use its WebSocket API. Unlike an HTTP route, that connection must be restored after every backend restart, which is why startForAllProjects() is necessary. Slack does the same for projects using Socket Mode.
| return result; | ||
| }; | ||
|
|
||
| export const deleteFeedbackVote = async (messageId: string, vote: 'up' | 'down'): Promise<void> => { |
There was a problem hiding this comment.
How is it handle elsewhere? Why do we need a specific function for this here but not elsewhere in the code?
There was a problem hiding this comment.
yeah this is mainly because we used reactions instead of buttons for thumbs up/down.
I'll try to put it back as buttons
There was a problem hiding this comment.
All reported issues were addressed across 12 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
|
So I kept |
Summary
Out of scope
Closes #1090