27 lines
787 B
TypeScript
27 lines
787 B
TypeScript
// Metro module 5136 (f5137).
|
|
import ImpersonateStore from "../impersonate/ImpersonateStore";
|
|
import { Endpoints } from "../../Constants";
|
|
import { updateImpersonatedData } from "../impersonate/ImpersonateActionCreators";
|
|
import Dispatcher from "../../Dispatcher";
|
|
import { HTTP } from "../../_bundle/sendRequest";
|
|
export function updateGuildSelfMember(a0, a1, r8 = false) {
|
|
if (ImpersonateStore.isFullServerPreview(a0)) {
|
|
updateImpersonatedData(a0, {
|
|
memberOptions: a1
|
|
});
|
|
return void 0;
|
|
}
|
|
Dispatcher.dispatch({
|
|
type: "GUILD_MEMBER_UPDATE_LOCAL",
|
|
guildId: a0,
|
|
roles: a1.roles,
|
|
flags: a1.flags
|
|
});
|
|
return HTTP.patch({
|
|
url: Endpoints.SET_GUILD_MEMBER(a0),
|
|
body: a1,
|
|
oldFormErrors: !!r8 || void 0,
|
|
rejectWithError: false
|
|
});
|
|
}
|