mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-17 03:43:11 -06:00
Unmarshal the content, that would help
This commit is contained in:
parent
07a89c4e6b
commit
7fd784034d
|
|
@ -2,6 +2,7 @@ package internal
|
|||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
|
@ -146,6 +147,9 @@ func (r *RoomserverInternalAPI) performJoinRoomByID(
|
|||
if se.Type() == gomatrixserverlib.MRoomMember {
|
||||
if se.StateKey() != nil && *se.StateKey() == userID {
|
||||
var content map[string]interface{}
|
||||
if err = json.Unmarshal(se.Content(), &content); err != nil {
|
||||
continue
|
||||
}
|
||||
if membership, ok := content["membership"]; ok {
|
||||
alreadyJoined = (membership == "join")
|
||||
break
|
||||
|
|
|
|||
Loading…
Reference in a new issue