mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-27 12:00:03 +03:00
Merge pull request #3680 from psrpinto/fix/naming
Standardise spelling and casing of homeserver, identity server, and integration manager
This commit is contained in:
commit
3116b1a1c4
41 changed files with 76 additions and 75 deletions
1
changelog.d/491.bugfix
Normal file
1
changelog.d/491.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Standardise spelling and casing of homeserver, identity server, and integration manager.
|
|
@ -4,7 +4,7 @@ Issue: #607
|
|||
PR: #1354
|
||||
|
||||
## Introduction
|
||||
Identity Servers support contact discovery on Matrix by letting people look up Third Party Identifiers to see if the owner has publicly linked them with their Matrix ID.
|
||||
Identity servers support contact discovery on Matrix by letting people look up Third Party Identifiers to see if the owner has publicly linked them with their Matrix ID.
|
||||
|
||||
## Implementation
|
||||
|
||||
|
@ -87,6 +87,6 @@ This screen displays the identity server configuration and the binding of the us
|
|||
This screen is a form to set a new identity server URL
|
||||
|
||||
## Ref:
|
||||
- https://matrix.org/blog/2019/09/27/privacy-improvements-in-synapse-1-4-and-riot-1-4 is a good summary of the role of an Identity server and the proper way to configure and use it in respect to the privacy and the consent of the user.
|
||||
- https://matrix.org/blog/2019/09/27/privacy-improvements-in-synapse-1-4-and-riot-1-4 is a good summary of the role of an identity server and the proper way to configure and use it in respect to the privacy and the consent of the user.
|
||||
- API documentation: https://matrix.org/docs/spec/identity_service/latest
|
||||
- vector.im TOS: https://vector.im/identity-server-privacy-notice
|
||||
|
|
|
@ -2,11 +2,11 @@ This document aims to describe how Element android displays notifications to the
|
|||
|
||||
# Table of Contents
|
||||
1. [Prerequisites Knowledge](#prerequisites-knowledge)
|
||||
* [How does a matrix client get a message from a Home Server?](#how-does-a-matrix-client-get-a-message-from-a-home-server)
|
||||
* [How does a matrix client get a message from a homeserver?](#how-does-a-matrix-client-get-a-message-from-a-homeserver)
|
||||
* [How does a mobile app receives push notification?](#how-does-a-mobile-app-receives-push-notification)
|
||||
* [Push VS Notification](#push-vs-notification)
|
||||
* [Push in the matrix federated world](#push-in-the-matrix-federated-world)
|
||||
* [How does the Home Server knows when to notify a client?](#how-does-the-home-server-knows-when-to-notify-a-client)
|
||||
* [How does the homeserver know when to notify a client?](#how-does-the-homeserver-know-when-to-notify-a-client)
|
||||
* [Push vs privacy, and mitigation](#push-vs-privacy-and-mitigation)
|
||||
* [Background processing limitations](#background-processing-limitations)
|
||||
2. [Element Notification implementations](#element-notification-implementations)
|
||||
|
@ -22,7 +22,7 @@ First let's start with some prerequisite knowledge
|
|||
|
||||
# Prerequisites Knowledge
|
||||
|
||||
## How does a matrix client get a message from a Home Server?
|
||||
## How does a matrix client get a message from a homeserver?
|
||||
|
||||
In order to get messages from a homeserver, a matrix client need to perform a ``sync`` operation.
|
||||
|
||||
|
@ -90,7 +90,7 @@ That means that Element Android, a matrix client created by New Vector, is using
|
|||
|
||||
If you create your own matrix client, you will also need to deploy an instance of a **Push Gateway** with the credentials needed to use FCM for your app.
|
||||
|
||||
On registration, a matrix client must tell to it's Home Server what Push Gateway to use.
|
||||
On registration, a matrix client must tell its homeserver what Push Gateway to use.
|
||||
|
||||
See [Sygnal](https://github.com/matrix-org/sygnal/) for a reference implementation.
|
||||
```
|
||||
|
@ -122,13 +122,13 @@ Recommended reading:
|
|||
* https://matrix.org/docs/spec/client_server/r0.4.0.html#id128
|
||||
|
||||
|
||||
## How does the Home Server knows when to notify a client?
|
||||
## How does the homeserver know when to notify a client?
|
||||
|
||||
This is defined by [**push rules**](https://matrix.org/docs/spec/client_server/r0.4.0.html#push-rules-).
|
||||
|
||||
`A push rule is a single rule that states under what conditions an event should be passed onto a push gateway and how the notification should be presented (sound / importance).`
|
||||
|
||||
A Home Server can be configured with default rules (for Direct messages, group messages, mentions, etc.. ).
|
||||
A homeserver can be configured with default rules (for Direct messages, group messages, mentions, etc.. ).
|
||||
|
||||
There are different kind of push rules, it can be per room (each new message on this room should be notified), it can also define a pattern that a message should match (when you are mentioned, or key word based).
|
||||
|
||||
|
@ -187,7 +187,7 @@ In background, and depending on wether push is available or not, Element will us
|
|||
|
||||
## Push (FCM) received in background
|
||||
|
||||
In order to enable Push, Element must first get a push token from the firebase SDK, then register a pusher with this token on the HomeServer.
|
||||
In order to enable Push, Element must first get a push token from the firebase SDK, then register a pusher with this token on the homeserver.
|
||||
|
||||
When a message should be notified to a user, the user's homeserver notifies the registered `push gateway` for Element, that is [sygnal](https://github.com/matrix-org/sygnal) _- The reference implementation for push gateways -_ hosted by matrix.org.
|
||||
|
||||
|
@ -199,7 +199,7 @@ Homeserver ----> Sygnal (configured for Element) ----> FCM ----> Element
|
|||
|
||||
The push gateway is configured to only send `(eventId,roomId)` in the push payload (for better [privacy](#push-vs-privacy-and-mitigation)).
|
||||
|
||||
Element needs then to synchronise with the user's HomeServer, in order to resolve the event and create a notification.
|
||||
Element needs then to synchronise with the user's homeserver, in order to resolve the event and create a notification.
|
||||
|
||||
As per [Google recommendation](https://android-developers.googleblog.com/2018/09/notifying-your-users-with-fcm.html), Element will then use the WorkManager API in order to trigger a background sync.
|
||||
|
||||
|
@ -217,7 +217,7 @@ Homeserver ----> Sygnal ----> FCM ----> Element
|
|||
|
||||
**Possible outcomes**
|
||||
|
||||
Upon reception of the FCM push, Element will perform a sync call to the Home Server, during this process it is possible that:
|
||||
Upon reception of the FCM push, Element will perform a sync call to the homeserver, during this process it is possible that:
|
||||
* Happy path, the sync is performed, the message resolved and displayed in the notification drawer
|
||||
* The notified message is not in the sync. Can happen if a lot of things did happen since the push (`gappy sync`)
|
||||
* The sync generates additional notifications (e.g an encrypted message where the user is mentioned detected locally)
|
||||
|
|
|
@ -78,7 +78,7 @@ class CommonTestHelper(context: Context) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a Home server configuration, with Http connection allowed for test
|
||||
* Create a homeserver configuration, with Http connection allowed for test
|
||||
*/
|
||||
fun createHomeServerConfig(): HomeServerConnectionConfig {
|
||||
return HomeServerConnectionConfig.Builder()
|
||||
|
|
|
@ -20,7 +20,7 @@ import io.realm.RealmObject
|
|||
import io.realm.annotations.Index
|
||||
|
||||
/**
|
||||
* Clients can store custom config data for their account on their HomeServer.
|
||||
* Clients can store custom config data for their account on their homeserver.
|
||||
* This account data will be synced between different devices and can persist across installations on a particular device.
|
||||
* Users may only view the account data for their own account.
|
||||
* The account_data may be either global or scoped to a particular rooms.
|
||||
|
|
|
@ -191,7 +191,7 @@ internal class DefaultIdentityService @Inject constructor(
|
|||
} else {
|
||||
// Disconnect previous one if any, first, because the token will change.
|
||||
// In case of error when configuring the new identity server, this is not a big deal,
|
||||
// we will ask for a new token on the previous Identity server
|
||||
// we will ask for a new token on the previous identity server
|
||||
runCatching { identityDisconnectTask.execute(Unit) }
|
||||
.onFailure { Timber.w(it, "Unable to disconnect identity server") }
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ internal interface IdentityAuthAPI {
|
|||
suspend fun ping()
|
||||
|
||||
/**
|
||||
* Ping v1 will be used to check outdated Identity server
|
||||
* Ping v1 will be used to check outdated identity server
|
||||
*/
|
||||
@GET("_matrix/identity/api/v1")
|
||||
suspend fun pingV1()
|
||||
|
|
|
@ -43,8 +43,8 @@ import javax.inject.Inject
|
|||
|
||||
/**
|
||||
* The integration manager allows to
|
||||
* - Get the Integration Manager that a user has explicitly set for its account (via account data)
|
||||
* - Get the recommended/preferred Integration Manager list as defined by the HomeServer (via wellknown)
|
||||
* - Get the integration manager that a user has explicitly set for its account (via account data)
|
||||
* - Get the recommended/preferred integration manager list as defined by the homeserver (via wellknown)
|
||||
* - Check if the user has disabled the integration manager feature
|
||||
* - Allow / Disallow Integration manager (propagated to other riot clients)
|
||||
*
|
||||
|
|
|
@ -86,7 +86,7 @@ internal interface ProfileAPI {
|
|||
suspend fun addMsisdn(@Body body: AddMsisdnBody): AddMsisdnResponse
|
||||
|
||||
/**
|
||||
* Validate Msisdn code (same model than for Identity server API)
|
||||
* Validate Msisdn code (same model than for identity server API)
|
||||
*/
|
||||
@POST
|
||||
suspend fun validateMsisdn(@Url url: String,
|
||||
|
|
|
@ -59,7 +59,7 @@ internal class CreateRoomBodyBuilder @Inject constructor(
|
|||
val invite3pids = params.invite3pids
|
||||
.takeIf { it.isNotEmpty() }
|
||||
?.let { invites ->
|
||||
// This can throw Exception if Identity server is not configured
|
||||
// This can throw an exception if identity server is not configured
|
||||
ensureIdentityTokenTask.execute(Unit)
|
||||
|
||||
val identityServerUrlWithoutProtocol = identityStore.getIdentityServerUrlWithoutProtocol()
|
||||
|
|
|
@ -58,7 +58,7 @@ class ConsentWebViewEventListener(activity: VectorBaseActivity<*>,
|
|||
session.profileApiClient
|
||||
.displayname(RIOT_BOT_ID, object : MatrixCallback<String>(createRiotBotRoomCallback) {
|
||||
override fun onSuccess(info: String?) {
|
||||
// Ok, the Home Server knows riot-Bot, so create a Room with him
|
||||
// Ok, the homeserver knows riot-Bot, so create a Room with him
|
||||
session.createDirectMessageRoom(RIOT_BOT_ID, createRiotBotRoomCallback)
|
||||
}
|
||||
})
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp"
|
||||
tools:text="Home Server URL: http://matrix.org" />
|
||||
tools:text="Homeserver URL: http://matrix.org" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ssl_fingerprint_title"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
app:layout_constraintEnd_toStartOf="@id/term_policy_arrow"
|
||||
app:layout_constraintStart_toEndOf="@id/term_accept_checkbox"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Integration Manager" />
|
||||
tools:text="Integration manager" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/term_description"
|
||||
|
|
Loading…
Reference in a new issue