diff --git a/app/src/main/java/org/thoughtcrime/securesms/groups/GroupManager.java b/app/src/main/java/org/thoughtcrime/securesms/groups/GroupManager.java
index 304571ab93..36d9a8e745 100644
--- a/app/src/main/java/org/thoughtcrime/securesms/groups/GroupManager.java
+++ b/app/src/main/java/org/thoughtcrime/securesms/groups/GroupManager.java
@@ -34,6 +34,7 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
+import java.util.Objects;
import java.util.Set;
public class GroupManager {
@@ -103,7 +104,7 @@ public class GroupManager {
final Recipient groupRecipient = Recipient.from(context, Address.Companion.fromSerialized(groupId), false);
final Set
memberAddresses = new HashSet<>();
- memberAddresses.add(Address.Companion.fromSerialized(TextSecurePreferences.getLocalNumber(context)));
+ memberAddresses.add(Address.Companion.fromSerialized(Objects.requireNonNull(TextSecurePreferences.getLocalNumber(context))));
groupDatabase.create(groupId, name, new LinkedList<>(memberAddresses), null, null, new LinkedList<>());
groupDatabase.updateProfilePicture(groupId, avatarBytes);
diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushDecryptJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushDecryptJob.java
index 0ae4c9ce57..955c733f75 100644
--- a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushDecryptJob.java
+++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushDecryptJob.java
@@ -1267,7 +1267,7 @@ public class PushDecryptJob extends BaseJob implements InjectableType {
private Recipient getMessageDestination(SignalServiceContent content, SignalServiceDataMessage message) {
if (message.getGroupInfo().isPresent()) {
- return Recipient.from(context, Address.Companion.fromExternal(context, GroupUtil.getEncodedClosedGroupID(message.getGroupInfo().get().getGroupId())), false);
+ return Recipient.from(context, Address.Companion.fromExternal(context, GroupUtil.getEncodedId(message.getGroupInfo().get())), false);
} else {
return Recipient.from(context, Address.Companion.fromExternal(context, content.getSender()), false);
}
diff --git a/libsession/src/main/java/org/session/libsession/messaging/threads/Address.kt b/libsession/src/main/java/org/session/libsession/messaging/threads/Address.kt
index 298a01b2bc..249cc50350 100644
--- a/libsession/src/main/java/org/session/libsession/messaging/threads/Address.kt
+++ b/libsession/src/main/java/org/session/libsession/messaging/threads/Address.kt
@@ -142,7 +142,7 @@ class Address private constructor(address: String) : Parcelable, Comparable = object : Parcelable.Creator {
+ @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator {
override fun createFromParcel(`in`: Parcel): Address {
return Address(`in`)
}
diff --git a/libsession/src/main/java/org/session/libsession/messaging/threads/GroupRecord.kt b/libsession/src/main/java/org/session/libsession/messaging/threads/GroupRecord.kt
index 316ae99ec2..2213fd85c1 100644
--- a/libsession/src/main/java/org/session/libsession/messaging/threads/GroupRecord.kt
+++ b/libsession/src/main/java/org/session/libsession/messaging/threads/GroupRecord.kt
@@ -6,9 +6,10 @@ import java.io.IOException
import java.util.*
class GroupRecord(
- val encodedId: String, val title: String, members: String?, val avatar: ByteArray,
- val avatarId: Long, val avatarKey: ByteArray, val avatarContentType: String,
- val relay: String, val isActive: Boolean, val avatarDigest: ByteArray, val isMms: Boolean, val url: String, admins: String?, val createAt: Long
+ val encodedId: String, val title: String, members: String?, val avatar: ByteArray?,
+ val avatarId: Long?, val avatarKey: ByteArray?, val avatarContentType: String?,
+ val relay: String?, val isActive: Boolean, val avatarDigest: ByteArray?, val isMms: Boolean,
+ val url: String?, admins: String?, val createAt: Long
) {
var members: List = LinkedList()
var admins: List = LinkedList()
diff --git a/libsession/src/main/java/org/session/libsession/utilities/GroupUtil.kt b/libsession/src/main/java/org/session/libsession/utilities/GroupUtil.kt
index 6bb640129c..69dfffcba0 100644
--- a/libsession/src/main/java/org/session/libsession/utilities/GroupUtil.kt
+++ b/libsession/src/main/java/org/session/libsession/utilities/GroupUtil.kt
@@ -55,7 +55,7 @@ object GroupUtil {
fun getEncodedId(group: SignalServiceGroup): String {
val groupId = group.groupId
if (group.groupType == SignalServiceGroup.GroupType.PUBLIC_CHAT) {
- return getEncodedOpenGroupID(groupId.toString())
+ return getEncodedOpenGroupID(String(groupId))
}
return getEncodedClosedGroupID(Hex.toStringCondensed(groupId))
}
diff --git a/libsession/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt b/libsession/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt
index 1fa2a94168..2f5e1c2ab8 100644
--- a/libsession/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt
+++ b/libsession/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt
@@ -916,7 +916,7 @@ object TextSecurePreferences {
@JvmStatic
fun hasSeenWelcomeScreen(context: Context): Boolean {
- return getBooleanPreference(context, SEEN_WELCOME_SCREEN_PREF, true)
+ return getBooleanPreference(context, SEEN_WELCOME_SCREEN_PREF, false)
}
fun setHasSeenWelcomeScreen(context: Context, value: Boolean) {