Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
MCUmbrella committed Jan 12, 2023
1 parent 53ae632 commit 7f430b2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>vip.floatationdevice</groupId>
<artifactId>guilded4j</artifactId>
<version>0.9.13</version>
<version>0.9.14</version>
<dependencies>
<dependency>
<groupId>cn.hutool</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public G4JWebSocketClient(String token)
{
super(WEBSOCKET_URI);
clearHeaders();
addHeader("User-Agent", "Guilded4J/0.9.12 Java-WebSocket/1.5.3");
addHeader("User-Agent", "Guilded4J/0.9.14 Java-WebSocket/1.5.3");
addHeader("Authorization", "Bearer " + token);
setHeartbeatInterval(heartbeatIntervalMs);
}
Expand All @@ -59,7 +59,7 @@ public G4JWebSocketClient(String token, String lastMessageId)
{
super(WEBSOCKET_URI);
clearHeaders();
addHeader("User-Agent", "Guilded4J/0.9.13 Java-WebSocket/1.5.3");
addHeader("User-Agent", "Guilded4J/0.9.14 Java-WebSocket/1.5.3");
addHeader("Authorization", "Bearer " + token);
if(lastMessageId != null) addHeader("guilded-last-message-id", lastMessageId);
setHeartbeatInterval(heartbeatIntervalMs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public JSONObject execute(Method method, String url, JSONObject body)
{
HttpRequest req = new HttpRequest(UrlBuilder.of(url))
.method(method)
.header("User-Agent", "Guilded4J/0.9.13 Hutool/5.8.11")
.header("User-Agent", "Guilded4J/0.9.14 Hutool/5.8.11")
.header("Authorization", "[REDACTED]")
.header("Accept", "application/json")
.header("Content-type", "application/json")
Expand Down
7 changes: 4 additions & 3 deletions src/test/java/vip/floatationdevice/guilded4j/G4JTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import vip.floatationdevice.guilded4j.event.GuildedWebSocketWelcomeEvent;
import vip.floatationdevice.guilded4j.event.UnknownGuildedEvent;

import java.util.Scanner;
import java.net.*;
import java.util.*;

/**
* Some temporary test code will go here.
Expand All @@ -24,10 +25,10 @@ public static void main(String[] args) throws Exception
s = new G4JDebugger.G4JSession();
s.restore();
c = new G4JClient(s.savedToken).setVerbose(true).setAutoReconnect(true);
//c.setProxy(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("127.0.0.1", 59909)));
c.setProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 9910)));
c.registerEventListener(new G4JTest()).connectWebSocket(true, null);
System.out.println(c.getMemberManager().getUser("@me"));
System.out.println(c.getMemberManager().getUser("8412wg5d"));
//System.out.println(c.getMemberManager().getUser("8412wg5d"));
//==============================================================
}

Expand Down

0 comments on commit 7f430b2

Please sign in to comment.