Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UBER-609: Fix inbox notification/view for telegram and gmail messages #3518

Merged
merged 2 commits into from
Jul 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions models/gmail/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down
1 change: 1 addition & 0 deletions models/gmail/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default mergeIds(gmailId, gmail, {
},
ids: {
TxSharedCreate: '' as Ref<TxViewlet>,
NewMessageNotification: '' as Ref<TxViewlet>,
EmailNotificationGroup: '' as Ref<NotificationGroup>
},
activity: {
Expand Down
18 changes: 18 additions & 0 deletions models/telegram/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down
4 changes: 3 additions & 1 deletion models/telegram/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<TxViewlet>,
TxSharedCreate: '' as Ref<TxViewlet>,
NewMessageNotificationViewlet: '' as Ref<TxViewlet>,
NotificationGroup: '' as Ref<NotificationGroup>
},
function: {
Expand Down
5 changes: 4 additions & 1 deletion plugins/contact-resources/src/components/ChannelPanel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@

{#await getPresenter(channel) then presenter}
{#if presenter}
<Component is={presenter} props={{ embedded, _id: channel?.attachedTo, _class: channel?.attachedToClass }} />
<Component
is={presenter}
props={{ embedded, _id: channel?.attachedTo, _class: channel?.attachedToClass, channel }}
/>
{/if}
{/await}
1 change: 1 addition & 0 deletions plugins/gmail-assets/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
1 change: 1 addition & 0 deletions plugins/gmail-assets/lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"Shared": "Публичный",
"AvailableTo": "Доступен для",
"HaveWrittenEmail": "написал(а) сообщение",
"NewIncomingMessage": "Прислал вам новое сообщение",
"ConfigLabel": "Электронная почта",
"ConfigDescription": "Расширение по работе с Gmail электронной почтой"
}
Expand Down
3 changes: 2 additions & 1 deletion plugins/gmail-resources/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
})
1 change: 1 addition & 0 deletions plugins/telegram-assets/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions plugins/telegram-assets/lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"Incoming": "Входящее",
"Messages": "Сообщения",
"NewMessage": "Новое сообщение",
"NewIncomingMessage": "Прислал новое сообщение",
"Telegram": "Telegram",
"TelegramIntegrationDesc": "Подключить Telegram",
"Status": "Статус",
Expand Down