diff --git a/core/group_party.go b/core/group_party.go index 99d0120..1097759 100644 --- a/core/group_party.go +++ b/core/group_party.go @@ -304,8 +304,8 @@ func (gp *groupParty) JoinParty(w http.ResponseWriter, r *http.Request) { } if gd == nil { - // 그룹이 없다. 실패 - w.WriteHeader(http.StatusBadRequest) + // 그룹이 없다. 없을 수도 있지 + gocommon.MakeEncoder(w, r).Encode("") return } @@ -314,9 +314,8 @@ func (gp *groupParty) JoinParty(w http.ResponseWriter, r *http.Request) { // 이미 멤버여야 재입장 가능 path := "$._members." + gd.tid(mid) + "._body" if _, err := gd.rh.JSONSet(gd.strid(), path, character, gocommon.RedisonSetOptionXX); err != nil { - // 멤버가 아니네? 그새 파티장이 쫓아냈나보다 - logger.Println("JoinParty failed. maybe kicked by party owner :", err) - w.WriteHeader(http.StatusInternalServerError) + // 멤버가 아니네? 그새 파티장이 쫓아냈을 수도 있다. + gocommon.MakeEncoder(w, r).Encode("") return } } @@ -345,6 +344,8 @@ func (gp *groupParty) JoinParty(w http.ResponseWriter, r *http.Request) { Body: gd.loadFull(), Tag: []string{"GroupDocFull"}, }) + + gocommon.MakeEncoder(w, r).Encode(gd.strid()) } func (gp *groupParty) ConditionalClearPartyMember(w http.ResponseWriter, r *http.Request) {