mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-22 20:32:24 +02:00
UBERF-9099: Rate limits (#7629)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -355,6 +355,10 @@ export class CommentSyncManager implements DocSyncManager {
|
||||
}
|
||||
}
|
||||
|
||||
isHulyLinkComment (message: string): boolean {
|
||||
return message.includes('<p>Connected to') && message.includes('Huly®')
|
||||
}
|
||||
|
||||
private async createComment (
|
||||
info: DocSyncInfo,
|
||||
messageData: MessageData,
|
||||
@@ -367,6 +371,11 @@ export class CommentSyncManager implements DocSyncManager {
|
||||
...messageData,
|
||||
attachments: 0
|
||||
}
|
||||
// Check if it is Connected message.
|
||||
if ((comment as any).performed_via_github_app !== undefined && this.isHulyLinkComment(comment.body)) {
|
||||
// No need to create comment on platform.
|
||||
return
|
||||
}
|
||||
await this.client.addCollection(
|
||||
chunter.class.ChatMessage,
|
||||
info.space,
|
||||
|
||||
Reference in New Issue
Block a user