mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
split userId on last @
(e.g. necessary if email adresses are taken as userId)
This commit is contained in:
parent
4b92cad611
commit
5e1b69bbe6
@ -171,8 +171,8 @@ class MainActivity : BaseActivity(), ActionBarProvider {
|
|||||||
|
|
||||||
when (intent.type) {
|
when (intent.type) {
|
||||||
"vnd.android.cursor.item/vnd.com.nextcloud.talk2.chat" -> {
|
"vnd.android.cursor.item/vnd.com.nextcloud.talk2.chat" -> {
|
||||||
val user = userId.split("@")[0]
|
val user = userId.substringBeforeLast("@")
|
||||||
val baseUrl = userId.split("@")[1]
|
val baseUrl = userId.substringAfterLast("@")
|
||||||
if (userUtils.currentUser?.baseUrl?.endsWith(baseUrl) == true) {
|
if (userUtils.currentUser?.baseUrl?.endsWith(baseUrl) == true) {
|
||||||
startConversation(user)
|
startConversation(user)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user