From 3f8141c2dcf126ac8ec0c41c29f4f0a363ad52a2 Mon Sep 17 00:00:00 2001 From: Gerben Droogers Date: Thu, 12 Oct 2017 20:07:20 +0200 Subject: [PATCH] Fix bug with HS url different then HS name --- app/src/main/java/eu/droogers/smsmatrix/Matrix.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/src/main/java/eu/droogers/smsmatrix/Matrix.java b/app/src/main/java/eu/droogers/smsmatrix/Matrix.java index 3d40e31..b75dd3a 100644 --- a/app/src/main/java/eu/droogers/smsmatrix/Matrix.java +++ b/app/src/main/java/eu/droogers/smsmatrix/Matrix.java @@ -170,12 +170,7 @@ public class Matrix { Map params = new HashMap<>(); params.put("displayname", displayname); params.put("membership", "join"); - session.getRoomsApiClient().sendStateEvent(roomId, "m.room.member", botId(), params, new SimpleApiCallback()); - } - - private String botId() { - String baseUrl = botHSUrl.replaceFirst("^(http(?>s)://www\\.|http(?>s)://|www\\.)",""); - return "@" + botUsername + ":" + baseUrl; + session.getRoomsApiClient().sendStateEvent(roomId, "m.room.member", session.getMyUserId(), params, new SimpleApiCallback()); } public void SendMesageToRoom(Room room, String body) {