split userId on last @

(e.g. necessary if email adresses are taken as userId)
This commit is contained in:
Marcel Hibbe 2021-03-17 10:24:13 +01:00
parent 4b92cad611
commit 5e1b69bbe6
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -171,8 +171,8 @@ class MainActivity : BaseActivity(), ActionBarProvider {
when (intent.type) {
"vnd.android.cursor.item/vnd.com.nextcloud.talk2.chat" -> {
val user = userId.split("@")[0]
val baseUrl = userId.split("@")[1]
val user = userId.substringBeforeLast("@")
val baseUrl = userId.substringAfterLast("@")
if (userUtils.currentUser?.baseUrl?.endsWith(baseUrl) == true) {
startConversation(user)
} else {