Merge branch 'room-fix-invite-direct-chat' into 'master'
[Room] Fix join invitation to direct chat See merge request famedly/famedlysdk!171
This commit is contained in:
commit
87f1a4ed99
|
@ -458,10 +458,11 @@ class Room {
|
||||||
try {
|
try {
|
||||||
await client.jsonRequest(
|
await client.jsonRequest(
|
||||||
type: HTTPType.POST, action: "/client/r0/rooms/${id}/join");
|
type: HTTPType.POST, action: "/client/r0/rooms/${id}/join");
|
||||||
if (states.containsKey(client.userID) &&
|
final Event invitation = getState("m.room.member", client.userID);
|
||||||
states[client.userID].content["is_direct"] is bool &&
|
if (invitation != null &&
|
||||||
states[client.userID].content["is_direct"]) {
|
invitation.content["is_direct"] is bool &&
|
||||||
await addToDirectChat(states[client.userID].sender.id);
|
invitation.content["is_direct"]) {
|
||||||
|
await addToDirectChat(invitation.sender.id);
|
||||||
}
|
}
|
||||||
} on MatrixException catch (exception) {
|
} on MatrixException catch (exception) {
|
||||||
if (exception.errorMessage == "No known servers") {
|
if (exception.errorMessage == "No known servers") {
|
||||||
|
|
Loading…
Reference in a new issue