Changeset View
Changeset View
Standalone View
Standalone View
src/client/actions/membership.cpp
| Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | namespace Kazv | ||||
| { | { | ||||
| if (! r.success()) { | if (! r.success()) { | ||||
| kzo.client.dbg() << "Create room failed" << std::endl; | kzo.client.dbg() << "Create room failed" << std::endl; | ||||
| m.addTrigger(CreateRoomFailed{r.errorCode(), r.errorMessage()}); | m.addTrigger(CreateRoomFailed{r.errorCode(), r.errorMessage()}); | ||||
| return { std::move(m), failWithResponse(r) }; | return { std::move(m), failWithResponse(r) }; | ||||
| } | } | ||||
| m.addTrigger(CreateRoomSuccessful{r.roomId()}); | m.addTrigger(CreateRoomSuccessful{r.roomId()}); | ||||
| return { std::move(m), lager::noop }; | return { std::move(m), [=](auto &&) { | ||||
| return EffectStatus(/* succ = */ true, json{ | |||||
| {"roomId", r.roomId()}, | |||||
| }); | |||||
| } }; | |||||
| } | } | ||||
| ClientResult updateClient(ClientModel m, InviteToRoomAction a) | ClientResult updateClient(ClientModel m, InviteToRoomAction a) | ||||
| { | { | ||||
| auto job = m.job<InviteUserJob>() | auto job = m.job<InviteUserJob>() | ||||
| .make(a.roomId, a.userId) | .make(a.roomId, a.userId) | ||||
| .withData(json{ | .withData(json{ | ||||
| {"roomId", a.roomId}, | {"roomId", a.roomId}, | ||||
| ▲ Show 20 Lines • Show All 188 Lines • Show Last 20 Lines | |||||