MCPcopy Create free account
hub / github.com/MathMan05/Fermi / loadChannel

Method loadChannel

src/webpage/guild.ts:1936–1962  ·  view source on GitHub ↗
(ID?: string | undefined | null, addstate = true, message?: string)

Source from the content-addressed store, hash-verified

1934 if (ID) {
1935 const channel = this.localuser.channels.get(ID);
1936 if (channel) {
1937 await channel.getHTML(addstate, undefined, message);
1938 return;
1939 } else {
1940 await this.goToThread(ID);
1941 return;
1942 }
1943 }
1944 if (this.prevchannel && ID !== null && this.prevchannel.visible) {
1945 console.log(this.prevchannel);
1946 await this.prevchannel.getHTML(addstate, undefined, message);
1947 return;
1948 }
1949 if (this.id !== "@me") {
1950 for (const thing of this.channels) {
1951 if (thing.type !== 4 && thing.visible) {
1952 await thing.getHTML(addstate, undefined, message);
1953 return;
1954 }
1955 }
1956 }
1957 this.removePrevChannel();
1958 this.noChannel(addstate);
1959 }
1960 removePrevChannel() {
1961 if (this.localuser.focusChannel) {
1962 this.localuser.focusChannel.infinite.delete();
1963 }
1964 if (this !== this.localuser.focusGuild) {
1965 this.loadGuild();

Callers 15

showWelcomeMethod · 0.95
goToThreadMethod · 0.95
noChannelMethod · 0.95
goToChannelDelayMethod · 0.95
handleEventMethod · 0.45
createChannelMethod · 0.45
goToStateMethod · 0.45
goToChannelMethod · 0.45
initMethod · 0.45
buildserversMethod · 0.45
guildDiscoveryMethod · 0.45
renderMethod · 0.45

Calls 4

goToThreadMethod · 0.95
removePrevChannelMethod · 0.95
noChannelMethod · 0.95
getHTMLMethod · 0.45

Tested by

no test coverage detected