-
Notifications
You must be signed in to change notification settings - Fork 64
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
#241 Group call notifications #250
Changes from 21 commits
9888273
42fbd15
596ca51
74a0b18
14dfbdb
4f9cc81
e4a98e6
9743c72
aa58ede
1b88471
259087a
aa38093
00668f8
b348531
be9fa3b
9fa6013
b63af09
b00181f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added ring for group calls | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,4 +180,6 @@ | |
<string name="settings_clear_highlight_on_scroll">Очистить выделение при прокрутке</string> | ||
<string name="settings_call_ringtone_use_default_stun_title">Разрешить резервный сервер звонков</string> | ||
<string name="settings_integrations_scalar_warning">⚠️ Эта настройка по умолчанию (если не изменена конфигурацией Вашего домашнего сервера) включает доступ к \"Scalar\", менеджеру интеграций от Element. К сожалению, он является проприетарным, т.е. его исходый код не открытый и не может быть проверен пользователями или разработчиками SchildiChat.</string> | ||
<string name="call_notification_open_app_action">Открыть приложение</string> | ||
<string name="labs_enable_group_call_notifications_summary">Включить уведомление для групповых звонков</string> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure if weblate will be happy for manually added translations. Maybe it works but safer path would probably merging without translation first, then add translations via weblate later. 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed manually added translation for Russian |
||
</resources> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -498,6 +498,8 @@ fun Event.getPollContent(): MessagePollContent? { | |
return getClearContent().toModel<MessagePollContent>() | ||
} | ||
|
||
fun Event.isJitsiEvent() = this.getClearType() == EventType.STATE_ROOM_WIDGET_LEGACY | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks too generic to me, won't that trigger for all kinds of widgets, not just jitsi? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated detecting function to more accurate one |
||
|
||
fun Event.supportsNotification() = | ||
this.getClearType() in EventType.MESSAGE + EventType.POLL_START.values + EventType.POLL_END.values + EventType.STATE_ROOM_BEACON_INFO.values | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,7 @@ | |
<bool name="settings_labs_rich_text_editor_default">false</bool> | ||
<bool name="settings_labs_enable_voice_broadcast_visible">true</bool> | ||
<bool name="settings_labs_enable_voice_broadcast_default">false</bool> | ||
<bool name="settings_labs_enable_jitsi_call_notifications_default">true</bool> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be false There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Disabled by default |
||
<!-- Level 1: Advanced settings --> | ||
|
||
<!-- Level 1: Help and about --> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright 2019 New Vector Ltd | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package im.vector.app.features.notifications | ||
|
||
import org.matrix.android.sdk.api.session.events.model.EventType | ||
|
||
data class NotifiableJitsiEvent( | ||
override val eventId: String, | ||
override val editedEventId: String?, | ||
override val canBeReplaced: Boolean, | ||
val noisy: Boolean, | ||
val timestamp: Long, | ||
val senderName: String?, | ||
val senderId: String?, | ||
val body: String?, | ||
val roomId: String, | ||
val threadId: String?, | ||
val roomName: String?, | ||
val roomIsDirect: Boolean = false, | ||
val roomAvatarPath: String? = null, | ||
val senderAvatarPath: String? = null, | ||
val matrixID: String? = null, | ||
val soundName: String? = null, | ||
// This is used for >N notification, as the result of a smart reply | ||
val outGoingMessage: Boolean = false, | ||
val outGoingMessageFailed: Boolean = false, | ||
override val isRedacted: Boolean = false, | ||
override val isUpdated: Boolean = false | ||
) : NotifiableEvent { | ||
|
||
val type: String = EventType.MESSAGE | ||
val description: String = body ?: "" | ||
val title: String = senderName ?: "" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this file for downstream changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this file