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

Method goToThread

src/webpage/guild.ts:1861–1879  ·  view source on GitHub ↗
(threadId: string)

Source from the content-addressed store, hash-verified

1859 noti.textContent = "";
1860 noti.classList.remove("pinged");
1861 }
1862 if (read) {
1863 noti.classList.remove("notiunread");
1864 } else {
1865 noti.classList.add("notiunread");
1866 }
1867 }
1868 async goToThread(threadId: string) {
1869 if (!this.localuser.channels.has(threadId)) {
1870 const channelJson = await (
1871 await fetch(this.info.api + "/channels/" + threadId, {
1872 headers: this.headers,
1873 })
1874 ).json();
1875 if (channelJson.code == 200) {
1876 const channel = new Channel(channelJson as channeljson, this);
1877 this.localuser.channels.set(channel.id, channel);
1878 channel.resolveparent(this);
1879 const par = this.localuser.channels.get(channel.parentId as string);
1880 par?.createguildHTML();
1881 } else {
1882 this.loadChannel();

Callers 3

loadChannelMethod · 0.95
setupcmenuMethod · 0.80
generateMessageMethod · 0.80

Calls 4

resolveparentMethod · 0.95
loadChannelMethod · 0.95
goToChannelMethod · 0.80
createguildHTMLMethod · 0.45

Tested by

no test coverage detected