mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
Set profile picture upon joining a public chat.
This commit is contained in:
parent
b5709473d7
commit
a5bf5c0f5d
@ -12,6 +12,7 @@ import nl.komponents.kovenant.ui.successUi
|
||||
import org.thoughtcrime.securesms.ApplicationContext
|
||||
import org.thoughtcrime.securesms.BaseActionBarActivity
|
||||
import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity
|
||||
import org.thoughtcrime.securesms.crypto.ProfileKeyUtil
|
||||
import org.thoughtcrime.securesms.util.DynamicTheme
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences
|
||||
|
||||
@ -58,6 +59,9 @@ class AddPublicChatActivity : PassphraseRequiredActionBarActivity() {
|
||||
application.lokiPublicChatManager.addChat(url, channel).successUi {
|
||||
lokiPublicChatAPI.getMessages(channel, url)
|
||||
lokiPublicChatAPI.setDisplayName(displayName, url)
|
||||
val profileKey: ByteArray = ProfileKeyUtil.getProfileKey(this)
|
||||
val profileUrl: String? = TextSecurePreferences.getProfileAvatarUrl(this)
|
||||
lokiPublicChatAPI.setProfilePicture(url, profileKey, profileUrl)
|
||||
finish()
|
||||
}.failUi {
|
||||
updateUI(false)
|
||||
|
Loading…
Reference in New Issue
Block a user