mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-06 17:57:42 +02:00
Adjust tg bot (#8412)
* Remove notification provider func Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com> * Adjust tg-bot Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com> * Use global integration Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com> * Use workspace integration Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com> * getSocialIdBySocialKey -> findFullSocialIdBySocialKey Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com> * move findFullSocialIdBySocialKey to service operations Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com> * use listIntegrations with account token Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com> * Adjust api Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com> * Fxi tests Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com> --------- Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
@@ -14,16 +14,9 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { ActivityMessage } from '@hcengineering/activity'
|
||||
import { Employee, Person, PersonSpace } from '@hcengineering/contact'
|
||||
import { PersonId, Class, Doc, Mixin, Ref, Tx, TxCUD, AccountUuid } from '@hcengineering/core'
|
||||
import {
|
||||
BaseNotificationType,
|
||||
InboxNotification,
|
||||
NotificationContent,
|
||||
NotificationProvider,
|
||||
NotificationType
|
||||
} from '@hcengineering/notification'
|
||||
import { NotificationContent, NotificationType } from '@hcengineering/notification'
|
||||
import { Metadata, Plugin, Resource, plugin } from '@hcengineering/platform'
|
||||
import type { TriggerControl, TriggerFunc } from '@hcengineering/server-core'
|
||||
|
||||
@@ -102,21 +95,6 @@ export interface SenderInfo {
|
||||
person?: Person
|
||||
}
|
||||
|
||||
export type NotificationProviderFunc = (
|
||||
control: TriggerControl,
|
||||
types: BaseNotificationType[],
|
||||
object: Doc,
|
||||
data: InboxNotification,
|
||||
receiver: ReceiverInfo,
|
||||
sender: SenderInfo,
|
||||
message?: ActivityMessage
|
||||
) => Promise<Tx[]>
|
||||
|
||||
export interface NotificationProviderResources extends Doc {
|
||||
provider: Ref<NotificationProvider>
|
||||
fn: Resource<NotificationProviderFunc>
|
||||
}
|
||||
|
||||
export const NOTIFICATION_BODY_SIZE = 50
|
||||
export const PUSH_NOTIFICATION_TITLE_SIZE = 80
|
||||
|
||||
@@ -130,9 +108,6 @@ export default plugin(serverNotificationId, {
|
||||
WebPushUrl: '' as Metadata<string>,
|
||||
InboxOnlyNotifications: '' as Metadata<boolean>
|
||||
},
|
||||
class: {
|
||||
NotificationProviderResources: '' as Ref<Class<NotificationProviderResources>>
|
||||
},
|
||||
mixin: {
|
||||
HTMLPresenter: '' as Ref<Mixin<HTMLPresenter>>,
|
||||
TextPresenter: '' as Ref<Mixin<TextPresenter>>,
|
||||
|
||||
Reference in New Issue
Block a user