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) {