mirror of
https://github.com/tijder/SmsMatrix.git
synced 2024-10-27 18:24:01 +00:00
Fix bug with HS url different then HS name
This commit is contained in:
parent
bacd9e10da
commit
3f8141c2dc
@ -170,12 +170,7 @@ public class Matrix {
|
|||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put("displayname", displayname);
|
params.put("displayname", displayname);
|
||||||
params.put("membership", "join");
|
params.put("membership", "join");
|
||||||
session.getRoomsApiClient().sendStateEvent(roomId, "m.room.member", botId(), params, new SimpleApiCallback<Void>());
|
session.getRoomsApiClient().sendStateEvent(roomId, "m.room.member", session.getMyUserId(), params, new SimpleApiCallback<Void>());
|
||||||
}
|
|
||||||
|
|
||||||
private String botId() {
|
|
||||||
String baseUrl = botHSUrl.replaceFirst("^(http(?>s)://www\\.|http(?>s)://|www\\.)","");
|
|
||||||
return "@" + botUsername + ":" + baseUrl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendMesageToRoom(Room room, String body) {
|
public void SendMesageToRoom(Room room, String body) {
|
||||||
|
Loading…
Reference in New Issue
Block a user