mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-21 12:39:58 +01:00
Pass 'null' for unset icon in custom status message
The OCS Status API expect an valid emoji or 'null' for the status icon in a custom message: > field: statusIcon > type: string/null > Description: The icon picked by the user (must be an emoji, at most one) See [1] for more details. Resolves: #1839 See: [1] https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-status-api.html#set-a-custom-message-user-defined Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
parent
98a2a62cbf
commit
3411728597
@ -393,15 +393,15 @@ class SetStatusDialogFragment :
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setStatusMessage() {
|
private fun setStatusMessage() {
|
||||||
var inputText = binding.customStatusInput.text.toString()
|
|
||||||
if (inputText.isEmpty()) {
|
val inputText = binding.customStatusInput.text.toString().ifEmpty { " " }
|
||||||
inputText = " "
|
// The endpoint '/message/custom' expects a valid emoji as string or null
|
||||||
}
|
val statusIcon = binding.emoji.text.toString().ifEmpty { null }
|
||||||
|
|
||||||
ncApi.setCustomStatusMessage(
|
ncApi.setCustomStatusMessage(
|
||||||
credentials,
|
credentials,
|
||||||
ApiUtils.getUrlForSetCustomStatus(currentUser?.baseUrl),
|
ApiUtils.getUrlForSetCustomStatus(currentUser?.baseUrl),
|
||||||
binding.emoji.text.toString(),
|
statusIcon,
|
||||||
inputText,
|
inputText,
|
||||||
clearAt
|
clearAt
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user