Move files

This commit is contained in:
Niels Andriesse 2021-05-18 09:50:16 +10:00
parent dc8938c269
commit c1548a4e51
69 changed files with 100 additions and 108 deletions

View File

@ -48,7 +48,7 @@ import org.session.libsession.utilities.Util;
import org.session.libsession.utilities.dynamiclanguage.DynamicLanguageContextWrapper;
import org.session.libsession.utilities.dynamiclanguage.LocaleParser;
import org.session.libsession.utilities.preferences.ProfileKeyUtil;
import org.session.libsignal.service.loki.LokiAPIDatabaseProtocol;
import org.session.libsignal.database.LokiAPIDatabaseProtocol;
import org.session.libsignal.utilities.ThreadUtils;
import org.session.libsignal.utilities.Log;
import org.signal.aesgcmprovider.AesGcmProvider;

View File

@ -11,9 +11,9 @@ import org.session.libsession.messaging.threads.Address
import org.session.libsession.messaging.utilities.DotNetAPI
import org.session.libsession.utilities.Util
import org.session.libsignal.utilities.guava.Optional
import org.session.libsignal.service.api.messages.SignalServiceAttachment
import org.session.libsignal.service.api.messages.SignalServiceAttachmentPointer
import org.session.libsignal.service.api.messages.SignalServiceAttachmentStream
import org.session.libsignal.messages.SignalServiceAttachment
import org.session.libsignal.messages.SignalServiceAttachmentPointer
import org.session.libsignal.messages.SignalServiceAttachmentStream
import org.session.libsignal.utilities.Base64
import org.session.libsignal.utilities.Log
import org.thoughtcrime.securesms.database.AttachmentDatabase

View File

@ -5,7 +5,7 @@ import androidx.annotation.NonNull;
import org.session.libsession.messaging.sending_receiving.attachments.Attachment;
import org.session.libsession.messaging.sending_receiving.attachments.PointerAttachment;
import org.session.libsignal.utilities.guava.Optional;
import org.session.libsignal.service.api.messages.shared.SharedContact;
import org.session.libsignal.messages.SharedContact;
import java.util.ArrayList;
import java.util.LinkedList;

View File

@ -114,7 +114,7 @@ import org.session.libsession.utilities.concurrent.AssertedSuccessListener;
import org.session.libsession.utilities.views.Stub;
import org.session.libsignal.exceptions.InvalidMessageException;
import org.session.libsignal.utilities.guava.Optional;
import org.session.libsignal.service.loki.Mention;
import org.session.libsession.messaging.mentions.Mention;
import org.session.libsignal.utilities.HexEncodingKt;
import org.session.libsignal.utilities.PublicKeyValidation;
import org.session.libsignal.utilities.ListenableFuture;

View File

@ -24,8 +24,8 @@ import org.session.libsession.utilities.GroupUtil;
import org.session.libsession.utilities.Util;
import org.session.libsignal.utilities.guava.Optional;
import org.session.libsignal.service.api.messages.SignalServiceAttachmentPointer;
import org.session.libsignal.service.loki.LokiOpenGroupDatabaseProtocol;
import org.session.libsignal.messages.SignalServiceAttachmentPointer;
import org.session.libsignal.database.LokiOpenGroupDatabaseProtocol;
import java.io.Closeable;
import java.security.SecureRandom;

View File

@ -11,7 +11,7 @@ import net.sqlcipher.database.SQLiteDatabase;
import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper;
import org.session.libsignal.utilities.Base64;
import org.session.libsignal.utilities.guava.Optional;
import org.session.libsignal.service.api.messages.SignalServiceEnvelope;
import org.session.libsignal.messages.SignalServiceEnvelope;
import org.session.libsignal.utilities.Util;
import java.io.IOException;

View File

@ -32,8 +32,8 @@ import org.session.libsession.utilities.preferences.ProfileKeyUtil
import org.session.libsignal.crypto.ecc.ECKeyPair
import org.session.libsignal.utilities.KeyHelper
import org.session.libsignal.utilities.guava.Optional
import org.session.libsignal.service.api.messages.SignalServiceAttachmentPointer
import org.session.libsignal.service.api.messages.SignalServiceGroup
import org.session.libsignal.messages.SignalServiceAttachmentPointer
import org.session.libsignal.messages.SignalServiceGroup
import org.thoughtcrime.securesms.ApplicationContext
import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper
import org.thoughtcrime.securesms.jobs.RetrieveProfileAvatarJob

View File

@ -20,8 +20,8 @@ import org.session.libsignal.utilities.Hex;
import org.session.libsignal.exceptions.InvalidMessageException;
import org.session.libsignal.utilities.guava.Optional;
import org.session.libsignal.service.api.SignalServiceMessageReceiver;
import org.session.libsignal.service.api.messages.SignalServiceAttachmentPointer;
import org.session.libsignal.service.api.push.exceptions.NonSuccessfulResponseCodeException;
import org.session.libsignal.messages.SignalServiceAttachmentPointer;
import org.session.libsignal.exceptions.NonSuccessfulResponseCodeException;
import java.io.File;
import java.io.FileInputStream;

View File

@ -14,7 +14,7 @@ import org.session.libsession.utilities.TextSecurePreferences;
import org.session.libsession.utilities.Util;
import org.session.libsignal.service.api.SignalServiceMessageReceiver;
import org.session.libsignal.streams.ProfileCipherInputStream;
import org.session.libsignal.service.api.push.exceptions.PushNetworkException;
import org.session.libsignal.exceptions.PushNetworkException;
import org.session.libsignal.utilities.Log;
import org.thoughtcrime.securesms.database.DatabaseFactory;
import org.thoughtcrime.securesms.database.RecipientDatabase;

View File

@ -24,7 +24,7 @@ import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity
import org.thoughtcrime.securesms.loki.utilities.*
import org.thoughtcrime.securesms.loki.views.GlowViewUtilities
import org.thoughtcrime.securesms.loki.views.PathDotView
import org.session.libsignal.service.loki.Snode
import org.session.libsignal.utilities.Snode
class PathActivity : PassphraseRequiredActionBarActivity() {
private val broadcastReceivers = mutableListOf<BroadcastReceiver>()

View File

@ -7,8 +7,8 @@ import org.session.libsession.utilities.TextSecurePreferences
import org.session.libsignal.crypto.ecc.DjbECPrivateKey
import org.session.libsignal.crypto.ecc.DjbECPublicKey
import org.session.libsignal.crypto.ecc.ECKeyPair
import org.session.libsignal.service.loki.Snode
import org.session.libsignal.service.loki.LokiAPIDatabaseProtocol
import org.session.libsignal.utilities.Snode
import org.session.libsignal.database.LokiAPIDatabaseProtocol
import org.session.libsignal.utilities.PublicKeyValidation
import org.session.libsignal.utilities.removing05PrefixIfNeeded
import org.session.libsignal.utilities.toHexString

View File

@ -7,7 +7,7 @@ import org.thoughtcrime.securesms.database.Database
import org.thoughtcrime.securesms.database.DatabaseFactory
import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper
import org.thoughtcrime.securesms.loki.utilities.*
import org.session.libsignal.service.loki.LokiMessageDatabaseProtocol
import org.session.libsignal.database.LokiMessageDatabaseProtocol
class LokiMessageDatabase(context: Context, helper: SQLCipherOpenHelper) : Database(context, helper), LokiMessageDatabaseProtocol {

View File

@ -11,7 +11,7 @@ import org.thoughtcrime.securesms.loki.utilities.get
import org.thoughtcrime.securesms.loki.utilities.insertOrUpdate
import org.session.libsession.messaging.threads.recipients.Recipient
import org.session.libsession.utilities.TextSecurePreferences
import org.session.libsignal.service.loki.LokiUserDatabaseProtocol
import org.session.libsignal.database.LokiUserDatabaseProtocol
class LokiUserDatabase(context: Context, helper: SQLCipherOpenHelper) : Database(context, helper), LokiUserDatabaseProtocol {

View File

@ -7,7 +7,7 @@ import org.session.libsession.messaging.sending_receiving.*
import org.session.libsignal.crypto.ecc.DjbECPrivateKey
import org.session.libsignal.crypto.ecc.DjbECPublicKey
import org.session.libsignal.crypto.ecc.ECKeyPair
import org.session.libsignal.service.api.messages.SignalServiceGroup
import org.session.libsignal.messages.SignalServiceGroup
import org.session.libsignal.protos.SignalServiceProtos
import org.session.libsignal.protos.SignalServiceProtos.DataMessage
import org.session.libsignal.utilities.removing05PrefixIfNeeded

View File

@ -4,12 +4,11 @@ import android.content.Context
import org.thoughtcrime.securesms.ApplicationContext
import org.session.libsession.messaging.threads.Address
import org.thoughtcrime.securesms.database.DatabaseFactory
import org.thoughtcrime.securesms.database.RecipientDatabase
import org.thoughtcrime.securesms.jobs.RetrieveProfileAvatarJob
import org.session.libsession.messaging.threads.recipients.Recipient
import org.session.libsession.utilities.TextSecurePreferences
import org.session.libsignal.service.api.messages.SignalServiceContent
import org.session.libsignal.service.api.messages.SignalServiceDataMessage
import org.session.libsignal.messages.SignalServiceContent
import org.session.libsignal.messages.SignalServiceDataMessage
import java.security.MessageDigest
object SessionMetaProtocol {

View File

@ -10,7 +10,7 @@ import android.widget.ListView
import org.thoughtcrime.securesms.database.DatabaseFactory
import org.thoughtcrime.securesms.loki.utilities.toPx
import org.thoughtcrime.securesms.mms.GlideRequests
import org.session.libsignal.service.loki.Mention
import org.session.libsession.messaging.mentions.Mention
class MentionCandidateSelectionView(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : ListView(context, attrs, defStyleAttr) {
private var mentionCandidates = listOf<Mention>()

View File

@ -9,7 +9,7 @@ import android.widget.LinearLayout
import kotlinx.android.synthetic.main.view_mention_candidate.view.*
import network.loki.messenger.R
import org.session.libsession.messaging.open_groups.OpenGroupAPI
import org.session.libsignal.service.loki.Mention
import org.session.libsession.messaging.mentions.Mention
import org.thoughtcrime.securesms.mms.GlideRequests
class MentionCandidateView(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : LinearLayout(context, attrs, defStyleAttr) {

View File

@ -12,7 +12,7 @@ import org.session.libsession.utilities.GroupUtil;
import org.session.libsession.utilities.SSKEnvironment;
import org.session.libsession.utilities.TextSecurePreferences;
import org.session.libsignal.utilities.guava.Optional;
import org.session.libsignal.service.api.messages.SignalServiceGroup;
import org.session.libsignal.messages.SignalServiceGroup;
import org.session.libsignal.utilities.Log;
import org.thoughtcrime.securesms.database.DatabaseFactory;

View File

@ -4,8 +4,8 @@ import org.session.libsession.messaging.open_groups.OpenGroup
import org.session.libsession.messaging.sending_receiving.attachments.*
import org.session.libsession.messaging.threads.Address
import org.session.libsession.messaging.utilities.DotNetAPI
import org.session.libsignal.service.api.messages.SignalServiceAttachmentPointer
import org.session.libsignal.service.api.messages.SignalServiceAttachmentStream
import org.session.libsignal.messages.SignalServiceAttachmentPointer
import org.session.libsignal.messages.SignalServiceAttachmentStream
import java.io.InputStream
interface MessageDataProvider {

View File

@ -20,8 +20,8 @@ import org.session.libsession.messaging.threads.Address
import org.session.libsession.messaging.threads.GroupRecord
import org.session.libsession.messaging.threads.recipients.Recipient.RecipientSettings
import org.session.libsignal.crypto.ecc.ECKeyPair
import org.session.libsignal.service.api.messages.SignalServiceAttachmentPointer
import org.session.libsignal.service.api.messages.SignalServiceGroup
import org.session.libsignal.messages.SignalServiceAttachmentPointer
import org.session.libsignal.messages.SignalServiceGroup
interface StorageProtocol {

View File

@ -8,7 +8,7 @@ import org.session.libsession.snode.OnionRequestAPI
import org.session.libsignal.utilities.Log
import org.session.libsignal.utilities.Base64
import org.session.libsignal.utilities.JsonUtil
import org.session.libsignal.service.loki.LokiAPIDatabaseProtocol
import org.session.libsignal.database.LokiAPIDatabaseProtocol
import org.session.libsignal.utilities.*
import java.net.URL

View File

@ -14,9 +14,9 @@ import org.session.libsession.messaging.sending_receiving.MessageSender
import org.session.libsession.messaging.utilities.Data
import org.session.libsession.messaging.utilities.DotNetAPI
import org.session.libsignal.streams.AttachmentCipherOutputStream
import org.session.libsignal.service.api.messages.SignalServiceAttachmentStream
import org.session.libsignal.messages.SignalServiceAttachmentStream
import org.session.libsignal.streams.PaddingInputStream
import org.session.libsignal.service.internal.push.PushAttachmentData
import org.session.libsignal.utilities.PushAttachmentData
import org.session.libsignal.streams.AttachmentCipherOutputStreamFactory
import org.session.libsignal.streams.DigestingRequestBody
import org.session.libsignal.utilities.Util
@ -68,7 +68,7 @@ class AttachmentUploadJob(val attachmentID: Long, val threadID: String, val mess
} else { // V1 open group
val server = v1OpenGroup.server
val pushData = PushAttachmentData(attachment.contentType, attachment.inputStream,
attachment.length, PlaintextOutputStreamFactory(), attachment.listener)
attachment.length, PlaintextOutputStreamFactory(), attachment.listener)
val result = FileServerAPI.shared.uploadAttachment(server, pushData)
handleSuccess(attachment, ByteArray(0), result)
}

View File

@ -1,3 +1,3 @@
package org.session.libsignal.service.loki
package org.session.libsession.messaging.mentions
data class Mention(val publicKey: String, val displayName: String)

View File

@ -1,9 +1,8 @@
package org.session.libsession.messaging.mentions
import org.session.libsession.messaging.MessagingModuleConfiguration
import org.session.libsignal.service.loki.Mention
import org.session.libsignal.service.loki.LokiUserDatabaseProtocol
import org.session.libsignal.database.LokiUserDatabaseProtocol
class MentionsManager(private val userPublicKey: String, private val userDatabase: LokiUserDatabaseProtocol) {
var userPublicKeyCache = mutableMapOf<Long, Set<String>>() // Thread ID to set of user hex encoded public keys

View File

@ -10,8 +10,8 @@ import org.session.libsession.messaging.sending_receiving.link_preview.LinkPrevi
import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel;
import org.session.libsession.utilities.GroupUtil;
import org.session.libsignal.utilities.guava.Optional;
import org.session.libsignal.service.api.messages.SignalServiceAttachment;
import org.session.libsignal.service.api.messages.SignalServiceGroup;
import org.session.libsignal.messages.SignalServiceAttachment;
import org.session.libsignal.messages.SignalServiceGroup;
import java.util.Collections;
import java.util.LinkedList;

View File

@ -11,7 +11,7 @@ import org.session.libsession.messaging.threads.Address;
import org.session.libsession.messaging.utilities.UpdateMessageData;
import org.session.libsession.utilities.GroupUtil;
import org.session.libsignal.utilities.guava.Optional;
import org.session.libsignal.service.api.messages.SignalServiceGroup;
import org.session.libsignal.messages.SignalServiceGroup;
public class IncomingTextMessage implements Parcelable {

View File

@ -6,7 +6,7 @@ import com.google.protobuf.ByteString
import org.session.libsession.messaging.sending_receiving.attachments.Attachment as SignalAttachment
import org.session.libsession.messaging.sending_receiving.attachments.PointerAttachment
import org.session.libsignal.utilities.guava.Optional
import org.session.libsignal.service.api.messages.SignalServiceAttachmentPointer
import org.session.libsignal.messages.SignalServiceAttachmentPointer
import org.session.libsignal.protos.SignalServiceProtos
import java.io.File

View File

@ -1,7 +1,7 @@
package org.session.libsession.messaging.open_groups
import org.session.libsession.messaging.MessagingModuleConfiguration
import org.session.libsignal.service.internal.push.PushTransportDetails
import org.session.libsignal.crypto.PushTransportDetails
import org.session.libsignal.protos.SignalServiceProtos
import org.session.libsignal.utilities.Base64
import org.session.libsignal.utilities.Base64.decode

View File

@ -5,7 +5,7 @@ import org.session.libsession.messaging.messages.Message
import org.session.libsession.messaging.messages.control.*
import org.session.libsession.messaging.messages.visible.VisibleMessage
import org.session.libsession.utilities.GroupUtil
import org.session.libsignal.service.internal.push.PushTransportDetails
import org.session.libsignal.crypto.PushTransportDetails
import org.session.libsignal.protos.SignalServiceProtos
object MessageReceiver {

View File

@ -21,7 +21,7 @@ import org.session.libsession.snode.SnodeModule
import org.session.libsession.snode.SnodeMessage
import org.session.libsession.utilities.GroupUtil
import org.session.libsession.utilities.SSKEnvironment
import org.session.libsignal.service.internal.push.PushTransportDetails
import org.session.libsignal.crypto.PushTransportDetails
import org.session.libsignal.protos.SignalServiceProtos
import org.session.libsignal.utilities.hexEncodedPublicKey
import org.session.libsignal.utilities.Base64

View File

@ -15,7 +15,7 @@ import org.session.libsession.utilities.TextSecurePreferences
import org.session.libsignal.crypto.ecc.Curve
import org.session.libsignal.crypto.ecc.ECKeyPair
import org.session.libsignal.utilities.guava.Optional
import org.session.libsignal.service.api.messages.SignalServiceGroup
import org.session.libsignal.messages.SignalServiceGroup
import org.session.libsignal.protos.SignalServiceProtos
import org.session.libsignal.utilities.hexEncodedPublicKey
import org.session.libsignal.utilities.removing05PrefixIfNeeded

View File

@ -24,7 +24,7 @@ import org.session.libsignal.crypto.ecc.DjbECPrivateKey
import org.session.libsignal.crypto.ecc.DjbECPublicKey
import org.session.libsignal.crypto.ecc.ECKeyPair
import org.session.libsignal.utilities.guava.Optional
import org.session.libsignal.service.api.messages.SignalServiceGroup
import org.session.libsignal.messages.SignalServiceGroup
import org.session.libsignal.protos.SignalServiceProtos
import org.session.libsignal.utilities.removing05PrefixIfNeeded
import org.session.libsignal.utilities.toHexString

View File

@ -6,8 +6,8 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.session.libsignal.utilities.guava.Optional;
import org.session.libsignal.service.api.messages.SignalServiceAttachment;
import org.session.libsignal.service.api.messages.SignalServiceDataMessage;
import org.session.libsignal.messages.SignalServiceAttachment;
import org.session.libsignal.messages.SignalServiceDataMessage;
import org.session.libsignal.utilities.Base64;
import org.session.libsignal.protos.SignalServiceProtos;

View File

@ -2,7 +2,7 @@ package org.session.libsession.messaging.sending_receiving.attachments
import com.google.protobuf.ByteString
import org.session.libsignal.utilities.guava.Optional
import org.session.libsignal.service.api.messages.SignalServiceAttachment
import org.session.libsignal.messages.SignalServiceAttachment
import java.io.InputStream
abstract class SessionServiceAttachment protected constructor(val contentType: String?) {

View File

@ -9,7 +9,7 @@ import android.util.Size
import com.google.protobuf.ByteString
import org.session.libsignal.utilities.guava.Optional
import org.session.libsignal.protos.SignalServiceProtos
import org.session.libsignal.service.api.messages.SignalServiceAttachment as SAttachment
import org.session.libsignal.messages.SignalServiceAttachment as SAttachment
import java.io.InputStream
import kotlin.math.round

View File

@ -7,7 +7,7 @@ import org.session.libsession.messaging.jobs.JobQueue
import org.session.libsession.messaging.jobs.MessageReceiveJob
import org.session.libsession.snode.SnodeAPI
import org.session.libsession.snode.SnodeModule
import org.session.libsignal.service.loki.Snode
import org.session.libsignal.utilities.Snode
import org.session.libsignal.utilities.Log
import java.security.SecureRandom
import java.util.*

View File

@ -12,11 +12,11 @@ import org.session.libsession.messaging.file_server.FileServerAPI
import org.session.libsignal.crypto.DiffieHellman
import org.session.libsignal.streams.ProfileCipherOutputStream
import org.session.libsignal.service.api.push.exceptions.NonSuccessfulResponseCodeException
import org.session.libsignal.service.api.push.exceptions.PushNetworkException
import org.session.libsignal.service.api.util.StreamDetails
import org.session.libsignal.service.internal.push.ProfileAvatarData
import org.session.libsignal.service.internal.push.PushAttachmentData
import org.session.libsignal.exceptions.NonSuccessfulResponseCodeException
import org.session.libsignal.exceptions.PushNetworkException
import org.session.libsignal.streams.StreamDetails
import org.session.libsignal.utilities.ProfileAvatarData
import org.session.libsignal.utilities.PushAttachmentData
import org.session.libsignal.streams.DigestingRequestBody
import org.session.libsignal.streams.ProfileCipherOutputStreamFactory
import org.session.libsignal.utilities.Hex

View File

@ -3,7 +3,7 @@ package org.session.libsession.messaging.utilities
import com.fasterxml.jackson.annotation.JsonSubTypes
import com.fasterxml.jackson.annotation.JsonTypeInfo
import com.fasterxml.jackson.core.JsonParseException
import org.session.libsignal.service.api.messages.SignalServiceGroup
import org.session.libsignal.messages.SignalServiceGroup
import org.session.libsignal.utilities.JsonUtil
import org.session.libsignal.utilities.Log
import java.util.*

View File

@ -11,8 +11,7 @@ import org.session.libsession.utilities.AESGCM
import org.session.libsignal.utilities.Log
import org.session.libsignal.utilities.Base64
import org.session.libsignal.utilities.*
import org.session.libsignal.service.loki.Snode
import org.session.libsignal.service.loki.*
import org.session.libsignal.utilities.Snode
import org.session.libsession.utilities.AESGCM.EncryptionResult
import org.session.libsession.utilities.getBodyForOnionRequest
import org.session.libsession.utilities.getHeadersForOnionRequest
@ -20,7 +19,7 @@ import org.session.libsignal.crypto.getRandomElement
import org.session.libsignal.crypto.getRandomElementOrNull
import org.session.libsignal.utilities.Broadcaster
import org.session.libsignal.utilities.HTTP
import org.session.libsignal.service.loki.LokiAPIDatabaseProtocol
import org.session.libsignal.database.LokiAPIDatabaseProtocol
private typealias Path = List<Snode>
@ -75,13 +74,13 @@ object OnionRequestAPI {
class InsufficientSnodesException : Exception("Couldn't find enough snodes to build a path.")
private data class OnionBuildingResult(
val guardSnode: Snode,
val finalEncryptionResult: EncryptionResult,
val destinationSymmetricKey: ByteArray
val guardSnode: Snode,
val finalEncryptionResult: EncryptionResult,
val destinationSymmetricKey: ByteArray
)
internal sealed class Destination {
class Snode(val snode: org.session.libsignal.service.loki.Snode) : Destination()
class Snode(val snode: org.session.libsignal.utilities.Snode) : Destination()
class Server(val host: String, val target: String, val x25519PublicKey: String, val scheme: String, val port: Int) : Destination()
}

View File

@ -9,9 +9,9 @@ import nl.komponents.kovenant.functional.map
import org.session.libsession.messaging.utilities.MessageWrapper
import org.session.libsession.snode.utilities.getRandomElement
import org.session.libsignal.protos.SignalServiceProtos
import org.session.libsignal.service.loki.Snode
import org.session.libsignal.utilities.Snode
import org.session.libsignal.utilities.HTTP
import org.session.libsignal.service.loki.LokiAPIDatabaseProtocol
import org.session.libsignal.database.LokiAPIDatabaseProtocol
import org.session.libsignal.utilities.Broadcaster
import org.session.libsignal.utilities.prettifiedDescription
import org.session.libsignal.utilities.removing05PrefixIfNeeded

View File

@ -1,6 +1,6 @@
package org.session.libsession.snode
import org.session.libsignal.service.loki.LokiAPIDatabaseProtocol
import org.session.libsignal.database.LokiAPIDatabaseProtocol
import org.session.libsignal.utilities.Broadcaster
class SnodeModule(val storage: LokiAPIDatabaseProtocol, val broadcaster: Broadcaster) {

View File

@ -1,6 +1,6 @@
package org.session.libsession.snode
import org.session.libsignal.service.loki.Snode
import org.session.libsignal.utilities.Snode
interface SnodeStorageProtocol {

View File

@ -6,9 +6,9 @@ import org.session.libsession.messaging.file_server.FileServerAPI
import org.session.libsession.messaging.file_server.FileServerAPIV2
import org.session.libsession.snode.OnionRequestAPI
import org.session.libsignal.utilities.Log
import org.session.libsignal.service.api.messages.SignalServiceAttachment
import org.session.libsignal.service.api.push.exceptions.NonSuccessfulResponseCodeException
import org.session.libsignal.service.api.push.exceptions.PushNetworkException
import org.session.libsignal.messages.SignalServiceAttachment
import org.session.libsignal.exceptions.NonSuccessfulResponseCodeException
import org.session.libsignal.exceptions.PushNetworkException
import org.session.libsignal.utilities.Base64
import java.io.*

View File

@ -1,6 +1,6 @@
package org.session.libsession.utilities
import org.session.libsignal.service.api.messages.SignalServiceGroup
import org.session.libsignal.messages.SignalServiceGroup
import org.session.libsignal.utilities.Hex
import java.io.IOException
import kotlin.jvm.Throws

View File

@ -7,7 +7,7 @@ import okio.Buffer
import org.session.libsession.messaging.file_server.FileServerAPIV2
import org.session.libsession.utilities.preferences.ProfileKeyUtil
import org.session.libsignal.streams.ProfileCipherOutputStream
import org.session.libsignal.service.internal.push.ProfileAvatarData
import org.session.libsignal.utilities.ProfileAvatarData
import org.session.libsignal.streams.DigestingRequestBody
import org.session.libsignal.streams.ProfileCipherOutputStreamFactory
import org.session.libsignal.utilities.retryIfNeeded

View File

@ -4,8 +4,7 @@
* Licensed according to the LICENSE file in this repository.
*/
package org.session.libsignal.service.internal.push;
package org.session.libsignal.crypto;
import org.session.libsignal.utilities.Log;

View File

@ -1,6 +1,7 @@
package org.session.libsignal.service.loki
package org.session.libsignal.database
import org.session.libsignal.crypto.ecc.ECKeyPair
import org.session.libsignal.utilities.Snode
import java.util.*
interface LokiAPIDatabaseProtocol {

View File

@ -1,4 +1,4 @@
package org.session.libsignal.service.loki
package org.session.libsignal.database
interface LokiMessageDatabaseProtocol {

View File

@ -1,4 +1,4 @@
package org.session.libsignal.service.loki
package org.session.libsignal.database
interface LokiOpenGroupDatabaseProtocol {

View File

@ -1,4 +1,4 @@
package org.session.libsignal.service.loki
package org.session.libsignal.database
interface LokiUserDatabaseProtocol {

View File

@ -4,7 +4,7 @@
* Licensed according to the LICENSE file in this repository.
*/
package org.session.libsignal.service.api.push.exceptions;
package org.session.libsignal.exceptions;
import java.io.IOException;

View File

@ -4,7 +4,7 @@
* Licensed according to the LICENSE file in this repository.
*/
package org.session.libsignal.service.api.push.exceptions;
package org.session.libsignal.exceptions;
import java.io.IOException;

View File

@ -1,7 +1,6 @@
package org.session.libsignal.service.api.messages.shared;
package org.session.libsignal.messages;
import org.session.libsignal.utilities.guava.Optional;
import org.session.libsignal.service.api.messages.SignalServiceAttachment;
import java.util.LinkedList;
import java.util.List;

View File

@ -4,7 +4,7 @@
* Licensed according to the LICENSE file in this repository.
*/
package org.session.libsignal.service.api.messages;
package org.session.libsignal.messages;
import org.session.libsignal.utilities.guava.Optional;

View File

@ -4,7 +4,7 @@
* Licensed according to the LICENSE file in this repository.
*/
package org.session.libsignal.service.api.messages;
package org.session.libsignal.messages;
import org.session.libsignal.utilities.guava.Optional;
import org.session.libsignal.service.api.SignalServiceMessageReceiver;

View File

@ -4,7 +4,7 @@
* Licensed according to the LICENSE file in this repository.
*/
package org.session.libsignal.service.api.messages;
package org.session.libsignal.messages;
import org.session.libsignal.utilities.guava.Optional;

View File

@ -4,7 +4,7 @@
* Licensed according to the LICENSE file in this repository.
*/
package org.session.libsignal.service.api.messages;
package org.session.libsignal.messages;
import org.session.libsignal.utilities.guava.Optional;
import org.session.libsignal.protos.SignalServiceProtos;

View File

@ -4,11 +4,10 @@
* Licensed according to the LICENSE file in this repository.
*/
package org.session.libsignal.service.api.messages;
package org.session.libsignal.messages;
import org.session.libsignal.utilities.guava.Optional;
import org.session.libsignal.service.api.messages.shared.SharedContact;
import org.session.libsignal.service.api.push.SignalServiceAddress;
import org.session.libsignal.utilities.SignalServiceAddress;
import org.session.libsignal.protos.SignalServiceProtos.DataMessage.ClosedGroupControlMessage;
import java.util.LinkedList;

View File

@ -4,11 +4,11 @@
* Licensed according to the LICENSE file in this repository.
*/
package org.session.libsignal.service.api.messages;
package org.session.libsignal.messages;
import com.google.protobuf.ByteString;
import org.session.libsignal.service.api.push.SignalServiceAddress;
import org.session.libsignal.utilities.SignalServiceAddress;
import org.session.libsignal.protos.SignalServiceProtos.Envelope;
/**

View File

@ -4,7 +4,7 @@
* Licensed according to the LICENSE file in this repository.
*/
package org.session.libsignal.service.api.messages;
package org.session.libsignal.messages;
import org.session.libsignal.utilities.guava.Optional;

View File

@ -1,5 +1,4 @@
package org.session.libsignal.service.api.messages;
package org.session.libsignal.messages;
import java.util.List;

View File

@ -1,4 +1,4 @@
package org.session.libsignal.service.api.messages;
package org.session.libsignal.messages;
public class SignalServiceTypingMessage {

View File

@ -7,9 +7,9 @@
package org.session.libsignal.service.api;
import org.session.libsignal.exceptions.InvalidMessageException;
import org.session.libsignal.service.api.messages.SignalServiceAttachment.ProgressListener;
import org.session.libsignal.service.api.messages.SignalServiceAttachmentPointer;
import org.session.libsignal.service.api.messages.SignalServiceDataMessage;
import org.session.libsignal.messages.SignalServiceAttachment.ProgressListener;
import org.session.libsignal.messages.SignalServiceAttachmentPointer;
import org.session.libsignal.messages.SignalServiceDataMessage;
import java.io.File;
import java.io.IOException;

View File

@ -1,6 +1,6 @@
package org.session.libsignal.streams;
import org.session.libsignal.service.api.messages.SignalServiceAttachment.ProgressListener;
import org.session.libsignal.messages.SignalServiceAttachment.ProgressListener;
import java.io.IOException;
import java.io.InputStream;

View File

@ -1,5 +1,4 @@
package org.session.libsignal.service.api.util;
package org.session.libsignal.streams;
import java.io.InputStream;

View File

@ -1,5 +1,4 @@
package org.session.libsignal.service.internal.push;
package org.session.libsignal.utilities;
import org.session.libsignal.streams.OutputStreamFactory;

View File

@ -4,9 +4,9 @@
* Licensed according to the LICENSE file in this repository.
*/
package org.session.libsignal.service.internal.push;
package org.session.libsignal.utilities;
import org.session.libsignal.service.api.messages.SignalServiceAttachment.ProgressListener;
import org.session.libsignal.messages.SignalServiceAttachment.ProgressListener;
import org.session.libsignal.streams.OutputStreamFactory;
import java.io.InputStream;

View File

@ -4,7 +4,7 @@
* Licensed according to the LICENSE file in this repository.
*/
package org.session.libsignal.service.api.push;
package org.session.libsignal.utilities;
import org.session.libsignal.utilities.guava.Optional;

View File

@ -1,4 +1,4 @@
package org.session.libsignal.service.loki
package org.session.libsignal.utilities
class Snode(val address: String, val port: Int, val publicKeySet: KeySet?) {
val ip: String get() = address.removePrefix("https://")