diff --git a/models/gmail/src/index.ts b/models/gmail/src/index.ts index 0321c5046a..8057d9168c 100644 --- a/models/gmail/src/index.ts +++ b/models/gmail/src/index.ts @@ -242,6 +242,24 @@ export function createModel (builder: Builder): void { gmail.ids.EmailNotification ) + builder.createDoc( + activity.class.TxViewlet, + core.space.Model, + { + objectClass: gmail.class.Message, + icon: contact.icon.Email, + txClass: core.class.TxCreateDoc, + match: { + 'attributes.incoming': true + }, + label: gmail.string.NewIncomingMessage, + display: 'inline', + editable: false, + hideOnRemove: true + }, + gmail.ids.NewMessageNotification + ) + builder.mixin(gmail.class.Message, core.class.Class, core.mixin.FullTextSearchContext, { parentPropagate: false }) diff --git a/models/gmail/src/plugin.ts b/models/gmail/src/plugin.ts index 411b7fd19d..2082b7a370 100644 --- a/models/gmail/src/plugin.ts +++ b/models/gmail/src/plugin.ts @@ -44,6 +44,7 @@ export default mergeIds(gmailId, gmail, { }, ids: { TxSharedCreate: '' as Ref, + NewMessageNotification: '' as Ref, EmailNotificationGroup: '' as Ref }, activity: { diff --git a/models/telegram/src/index.ts b/models/telegram/src/index.ts index b2771c89e0..7b03059fb2 100644 --- a/models/telegram/src/index.ts +++ b/models/telegram/src/index.ts @@ -204,6 +204,24 @@ export function createModel (builder: Builder): void { telegram.ids.NewMessageNotification ) + builder.createDoc( + activity.class.TxViewlet, + core.space.Model, + { + objectClass: telegram.class.Message, + icon: contact.icon.Telegram, + txClass: core.class.TxCreateDoc, + match: { + 'attributes.incoming': true + }, + label: telegram.string.NewIncomingMessage, + display: 'inline', + editable: false, + hideOnRemove: true + }, + telegram.ids.NewMessageNotificationViewlet + ) + builder.mixin(telegram.class.Message, core.class.Class, core.mixin.FullTextSearchContext, { parentPropagate: false }) diff --git a/models/telegram/src/plugin.ts b/models/telegram/src/plugin.ts index cba20d01fa..02bdc1c135 100644 --- a/models/telegram/src/plugin.ts +++ b/models/telegram/src/plugin.ts @@ -35,11 +35,13 @@ export default mergeIds(telegramId, telegram, { Status: '' as IntlString, ConfigLabel: '' as IntlString, ConfigDescription: '' as IntlString, - NewMessage: '' as IntlString + NewMessage: '' as IntlString, + NewIncomingMessage: '' as IntlString }, ids: { TxMessage: '' as Ref, TxSharedCreate: '' as Ref, + NewMessageNotificationViewlet: '' as Ref, NotificationGroup: '' as Ref }, function: { diff --git a/plugins/contact-resources/src/components/ChannelPanel.svelte b/plugins/contact-resources/src/components/ChannelPanel.svelte index b523ddbbb4..aeb8c8a8e6 100644 --- a/plugins/contact-resources/src/components/ChannelPanel.svelte +++ b/plugins/contact-resources/src/components/ChannelPanel.svelte @@ -43,6 +43,9 @@ {#await getPresenter(channel) then presenter} {#if presenter} - + {/if} {/await} diff --git a/plugins/gmail-assets/lang/en.json b/plugins/gmail-assets/lang/en.json index f06feff8df..d00cc4b517 100644 --- a/plugins/gmail-assets/lang/en.json +++ b/plugins/gmail-assets/lang/en.json @@ -34,6 +34,7 @@ "Shared": "Shared", "AvailableTo": "Available to", "HaveWrittenEmail": "have written an email", + "NewIncomingMessage": "Sent you a new email", "ConfigLabel": "Email", "ConfigDescription": "Extension for Gmail email integration" } diff --git a/plugins/gmail-assets/lang/ru.json b/plugins/gmail-assets/lang/ru.json index dad35785ce..efcad84de1 100644 --- a/plugins/gmail-assets/lang/ru.json +++ b/plugins/gmail-assets/lang/ru.json @@ -34,6 +34,7 @@ "Shared": "Публичный", "AvailableTo": "Доступен для", "HaveWrittenEmail": "написал(а) сообщение", + "NewIncomingMessage": "Прислал вам новое сообщение", "ConfigLabel": "Электронная почта", "ConfigDescription": "Расширение по работе с Gmail электронной почтой" } diff --git a/plugins/gmail-resources/src/plugin.ts b/plugins/gmail-resources/src/plugin.ts index 50d7c8a09a..62e21b5774 100644 --- a/plugins/gmail-resources/src/plugin.ts +++ b/plugins/gmail-resources/src/plugin.ts @@ -43,6 +43,7 @@ export default mergeIds(gmailId, gmail, { Shared: '' as IntlString, AvailableTo: '' as IntlString, Email: '' as IntlString, - HaveWrittenEmail: '' as IntlString + HaveWrittenEmail: '' as IntlString, + NewIncomingMessage: '' as IntlString } }) diff --git a/plugins/telegram-assets/lang/en.json b/plugins/telegram-assets/lang/en.json index d1d275a0c2..c295ff870a 100644 --- a/plugins/telegram-assets/lang/en.json +++ b/plugins/telegram-assets/lang/en.json @@ -20,6 +20,7 @@ "Incoming": "Incoming", "Messages": "Messages", "NewMessage": "New message", + "NewIncomingMessage": "Sent you a new message", "Telegram": "Telegram", "TelegramIntegrationDesc": "Use telegram integration", "Status": "Status", diff --git a/plugins/telegram-assets/lang/ru.json b/plugins/telegram-assets/lang/ru.json index 7cdddb70a7..b64ea3ec8a 100644 --- a/plugins/telegram-assets/lang/ru.json +++ b/plugins/telegram-assets/lang/ru.json @@ -20,6 +20,7 @@ "Incoming": "Входящее", "Messages": "Сообщения", "NewMessage": "Новое сообщение", + "NewIncomingMessage": "Прислал новое сообщение", "Telegram": "Telegram", "TelegramIntegrationDesc": "Подключить Telegram", "Status": "Статус",