Skip to content

Commit 25c2da7

Browse files
committed
Allow icon-only and clear-at-only status updates
The server rejects a status update whose message field is empty, even when the caller is only changing the icon or clearAt. Substitute a single space so those single-field updates go through, matching the fix applied in nextcloud/talk-android@a89c5952fa. Fixes #9855 Signed-off-by: ibrahim-iqbal <199698216+ibrahim-iqbal@users.noreply.github.com>
1 parent 576dc13 commit 25c2da7

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

app/src/main/java/com/nextcloud/ui/SetStatusMessageBottomSheet.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,14 @@ class SetStatusMessageBottomSheet(val user: User, val currentStatus: Status?) :
279279
{ dismiss(it) }
280280
)
281281
} else {
282+
// The server rejects a status update whose message field is empty,
283+
// even when the caller is only changing the icon or clearAt. Fall
284+
// back to a single space so those single-field updates go through.
285+
// Matches the fix applied in nextcloud/talk-android@a89c5952fa.
286+
val message = binding.customStatusInput.text.toString().ifEmpty { " " }
282287
asyncRunner.postQuickTask(
283288
SetUserDefinedCustomStatusTask(
284-
binding.customStatusInput.text.toString(),
289+
message,
285290
binding.emoji.text.toString(),
286291
clearAt,
287292
accountManager.currentOwnCloudAccount?.savedAccount,

0 commit comments

Comments
 (0)