making the add email pusher append parameter configurable by clients, typically we wouldn't want to overwrite other accounts but we can expose the option to clients if they want that behaviour
This commit is contained in:
parent
3a1cb1c07a
commit
95b4f99970
|
@ -71,6 +71,10 @@ interface PushersService {
|
|||
* @param emailBranding The branding placeholder to include in the email communications.
|
||||
* @param appDisplayName A human readable string that will allow the user to identify what application owns this pusher.
|
||||
* @param deviceDisplayName A human readable string that will allow the user to identify what device owns this pusher.
|
||||
* @param append If true, the homeserver should add another pusher with the given pushkey and App ID in addition
|
||||
* to any others with different user IDs. Otherwise, the homeserver must remove any other pushers
|
||||
* with the same App ID and pushkey for different users. Typically We always want to append for
|
||||
* email pushers since we don't want to stop other accounts notifying to the same email address.
|
||||
* @return A work request uuid. Can be used to listen to the status
|
||||
* (LiveData<WorkInfo> status = workManager.getWorkInfoByIdLiveData(<UUID>))
|
||||
* @throws [InvalidParameterException] if a parameter is not correct
|
||||
|
@ -79,7 +83,8 @@ interface PushersService {
|
|||
lang: String,
|
||||
emailBranding: String,
|
||||
appDisplayName: String,
|
||||
deviceDisplayName: String): UUID
|
||||
deviceDisplayName: String,
|
||||
append: Boolean = true): UUID
|
||||
|
||||
/**
|
||||
* Directly ask the push gateway to send a push to this device
|
||||
|
|
|
@ -85,7 +85,8 @@ internal class DefaultPushersService @Inject constructor(
|
|||
lang: String,
|
||||
emailBranding: String,
|
||||
appDisplayName: String,
|
||||
deviceDisplayName: String
|
||||
deviceDisplayName: String,
|
||||
append: Boolean
|
||||
) = addPusher(
|
||||
JsonPusher(
|
||||
pushKey = email,
|
||||
|
@ -96,7 +97,7 @@ internal class DefaultPushersService @Inject constructor(
|
|||
appDisplayName = appDisplayName,
|
||||
deviceDisplayName = deviceDisplayName,
|
||||
data = JsonPusherData(brand = emailBranding),
|
||||
append = true
|
||||
append = append
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue