1
1
mirror of https://github.com/ahabhyde/miguelbridge synced 2025-01-09 22:24:18 +01:00

Revert "First version with 5000 timeout long poll request"

This reverts commit c657f6a022.
This commit is contained in:
Ahab Hyde 2018-10-14 00:40:58 +02:00
parent c657f6a022
commit aa17465713
3 changed files with 4 additions and 4 deletions

View File

@ -65,7 +65,7 @@ public class Launcher {
while (true) {
//Main loop del bot di matrix
//Thread.sleep(sleepTime);
Thread.sleep(sleepTime);
rooms = getRooms();
for (int roomNumber=0; roomNumber<rooms.size(); roomNumber++) {
JSONObject room = (JSONObject) rooms.get(roomNumber);

View File

@ -240,7 +240,7 @@ public class MatrixBot {
try {
String filtro = URLEncoder.encode("{\"room\":{\"timeline\":{\"limit\":1}}}", "UTF-8");
String requestUrl = homeUrl +
String.format("client/r0/sync?filter=%s&timeout=5000&access_token=%s",
String.format("client/r0/sync?filter=%s&access_token=%s",
filtro, accessToken);
String[] risposta = RequestHandler.getRequest(requestUrl);

View File

@ -1,4 +1,4 @@
\package test;
package test;
import com.em.miguelbridge.botmatrix.MatrixBot;
import org.json.simple.parser.ParseException;
@ -47,6 +47,6 @@ public class UploadTest {
File file = new File("prova.jpg");
//bot.sendMessage("provaa", "!mPkXwqjuGdhEVSopiG:maxwell.ydns.eu");
//System.out.println(bot.sendFile("!mPkXwqjuGdhEVSopiG:maxwell.ydns.eu", file, null, true));
System.out.println(bot.sendFile("!mPkXwqjuGdhEVSopiG:maxwell.ydns.eu", file, null, true));
}
}