mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-12 04:47:44 +00:00
feat: open group attachment and message processing
This commit is contained in:
@@ -576,6 +576,13 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
return if (threadID < 0) null else threadID
|
||||
}
|
||||
|
||||
override fun getThreadIdForMms(mmsId: Long): Long {
|
||||
val mmsDb = DatabaseFactory.getMmsDatabase(context)
|
||||
val cursor = mmsDb.getMessage(mmsId)
|
||||
val reader = mmsDb.readerFor(cursor)
|
||||
return reader.current.threadId
|
||||
}
|
||||
|
||||
override fun getSessionRequestSentTimestamp(publicKey: String): Long? {
|
||||
return DatabaseFactory.getLokiAPIDatabase(context).getSessionRequestSentTimestamp(publicKey)
|
||||
}
|
||||
|
@@ -110,7 +110,7 @@ class PublicChatManager(private val context: Context) {
|
||||
fun addChat(server: String, room: String, info: OpenGroupAPIV2.Info, publicKey: String): OpenGroupV2 {
|
||||
val chat = OpenGroupV2(server, room, info.name, publicKey)
|
||||
var threadID = GroupManager.getOpenGroupThreadID(chat.id, context)
|
||||
var profilePicture: Bitmap? = null
|
||||
val profilePicture: Bitmap?
|
||||
if (threadID < 0) {
|
||||
val profilePictureAsByteArray = try {
|
||||
OpenGroupAPIV2.downloadOpenGroupProfilePicture(info.id,server).get()
|
||||
|
Reference in New Issue
Block a user