Compare commits

..

No commits in common. "master" and "v3.3.0+td.1.8.25" have entirely different histories.

6 changed files with 11 additions and 47 deletions

View File

@ -23,7 +23,7 @@
- amd64 (Linux, Windows, MacOS)
- armhf (Linux)
- arm64 (Linux, MacOS)
- arm64 (Linux)
- ppc64el (Linux)
- riscv64 (linux)
@ -148,7 +148,6 @@ To use TDLight Java you need to include the native libraries, by specifying one
- `linux_ppc64el_gnu_ssl3`
- `linux_riscv64_gnu_ssl3`
- `windows_amd64`
- `macos_arm64`
- `macos_amd64`
Advanced: If you want to use a different precompiled native, please set the java property `it.tdlight.native.workdir`. (Please note that you must build [this](https://github.com/tdlight-team/tdlight-java-natives), you can't put random precompiled tdlib binaries found on the internet)

View File

@ -8,8 +8,8 @@
<name>TDLight Java BOM</name>
<properties>
<revision>3.0.0.0-SNAPSHOT</revision>
<tdlight.natives.version>4.0.507</tdlight.natives.version>
<tdlight.api.version>4.0.477</tdlight.api.version>
<tdlight.natives.version>4.0.502</tdlight.natives.version>
<tdlight.api.version>4.0.472</tdlight.api.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
@ -150,12 +150,6 @@
<version>${tdlight.natives.version}</version>
<classifier>macos_amd64</classifier>
</dependency>
<dependency>
<groupId>it.tdlight</groupId>
<artifactId>tdlight-natives</artifactId>
<version>${tdlight.natives.version}</version>
<classifier>macos_arm64</classifier>
</dependency>
</dependencies>
</dependencyManagement>

View File

@ -26,7 +26,7 @@
<dependency>
<groupId>it.tdlight</groupId>
<artifactId>tdlight-java-bom</artifactId>
<version>3.4.0+td.1.8.26</version>
<version>3.2.2+td.1.8.21</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@ -66,11 +66,6 @@
<artifactId>tdlight-natives</artifactId>
<classifier>macos_amd64</classifier>
</dependency>
<dependency>
<groupId>it.tdlight</groupId>
<artifactId>tdlight-natives</artifactId>
<classifier>macos_arm64</classifier>
</dependency>
<!-- log4j logging -->
<dependency>
@ -103,15 +98,15 @@
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.3.1</version>
<version>3.1.0</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<version>3.8.1</version>
<configuration>
<encoding>UTF-8</encoding>
<source>17</source>
@ -120,15 +115,15 @@
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<version>3.2.0</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.1</version>
<version>3.0.0-M1</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.1</version>
<version>2.8.2</version>
</plugin>
</plugins>
</build>

View File

@ -12,9 +12,7 @@ import it.tdlight.client.SimpleTelegramClientFactory;
import it.tdlight.client.TDLibSettings;
import it.tdlight.jni.TdApi;
import it.tdlight.jni.TdApi.AuthorizationState;
import it.tdlight.jni.TdApi.CreatePrivateChat;
import it.tdlight.jni.TdApi.FormattedText;
import it.tdlight.jni.TdApi.GetChat;
import it.tdlight.jni.TdApi.InputMessageText;
import it.tdlight.jni.TdApi.Message;
import it.tdlight.jni.TdApi.MessageContent;
@ -77,12 +75,9 @@ public final class Example {
// Get me
TdApi.User me = app.getClient().getMeAsync().get(1, TimeUnit.MINUTES);
// Create the "saved messages" chat
var savedMessagesChat = app.getClient().send(new CreatePrivateChat(me.id, true)).get(1, TimeUnit.MINUTES);
// Send a test message
var req = new SendMessage();
req.chatId = savedMessagesChat.id;
req.chatId = me.id;
var txt = new InputMessageText();
txt.text = new FormattedText("TDLight test", new TextEntity[0]);
req.inputMessageContent = txt;

View File

@ -55,7 +55,6 @@ final class AuthorizationStateWaitAuthenticationDataHandler implements GenericUp
false,
false,
false,
false,
null,
null
);

View File

@ -12,8 +12,6 @@ import it.tdlight.jni.TdApi;
import it.tdlight.jni.TdApi.ChatListArchive;
import it.tdlight.jni.TdApi.ChatListMain;
import it.tdlight.jni.TdApi.Function;
import it.tdlight.jni.TdApi.LoadChats;
import it.tdlight.jni.TdApi.LogOut;
import it.tdlight.jni.TdApi.Message;
import it.tdlight.jni.TdApi.Update;
import it.tdlight.jni.TdApi.User;
@ -506,22 +504,6 @@ public final class SimpleTelegramClient implements Authenticable, MutableTelegra
return meGetter.getMeAsync();
}
/**
* Loads more chats from the main chat list. The loaded chats and their positions in the chat list will be sent through updates. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. Returns a 404 error if all chats have been loaded.
*
**/
public CompletableFuture<Void> loadChatListMainAsync() {
return send(new LoadChats(new ChatListMain(), 2000)).thenAccept(ok -> {});
}
/**
* Closes the TDLib instance after a proper logout. Requires an available network connection. All local data will be destroyed. After the logout completes, updateAuthorizationState with authorizationStateClosed will be sent.
*
**/
public CompletableFuture<Void> logOutAsync() {
return send(new LogOut()).thenAccept(ok -> {});
}
public boolean isMainChatsListLoaded() {
return mainChatsLoader.isLoaded();
}