mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 16:46:08 +02:00
598 lines
24 KiB
HTML
598 lines
24 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Class ChannelsController | EchoHub Documentation </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="Class ChannelsController | EchoHub Documentation ">
|
|
|
|
|
|
<link rel="icon" href="../../images/hue_icon.svg">
|
|
<link rel="stylesheet" href="../../public/docfx.min.css">
|
|
<link rel="stylesheet" href="../../public/main.css">
|
|
<meta name="docfx:navrel" content="../../toc.html">
|
|
<meta name="docfx:tocrel" content="../toc.html">
|
|
|
|
<meta name="docfx:rel" content="../../">
|
|
|
|
|
|
<meta name="docfx:docurl" content="https://github.com/HueByte/EchoHub/new/master/apiSpec/new?filename=EchoHub_Server_Controllers_ChannelsController.md&value=---%0Auid%3A%20EchoHub.Server.Controllers.ChannelsController%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
|
|
<meta name="loc:inThisArticle" content="In this article">
|
|
<meta name="loc:searchResultsCount" content="{count} results for "{query}"">
|
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
|
<meta name="loc:tocFilter" content="Filter by title">
|
|
<meta name="loc:nextArticle" content="Next">
|
|
<meta name="loc:prevArticle" content="Previous">
|
|
<meta name="loc:themeLight" content="Light">
|
|
<meta name="loc:themeDark" content="Dark">
|
|
<meta name="loc:themeAuto" content="Auto">
|
|
<meta name="loc:changeTheme" content="Change theme">
|
|
<meta name="loc:copy" content="Copy">
|
|
<meta name="loc:downloadPdf" content="Download PDF">
|
|
|
|
<script type="module" src="./../../public/docfx.min.js"></script>
|
|
|
|
<script>
|
|
const theme = localStorage.getItem('theme') || 'auto'
|
|
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
|
|
<header class="bg-body border-bottom">
|
|
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
|
|
<div class="container-xxl flex-nowrap">
|
|
<a class="navbar-brand" href="../../index.html">
|
|
<img id="logo" class="svg" src="../../images/hue_icon.svg" alt="EchoHub">
|
|
EchoHub
|
|
</a>
|
|
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
|
|
<i class="bi bi-three-dots"></i>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navpanel">
|
|
<div id="navbar">
|
|
<form class="search" role="search" id="search">
|
|
<i class="bi bi-search"></i>
|
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
</header>
|
|
|
|
<main class="container-xxl">
|
|
<div class="toc-offcanvas">
|
|
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
|
|
<div class="offcanvas-header">
|
|
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
|
|
</div>
|
|
<div class="offcanvas-body">
|
|
<nav class="toc" id="toc"></nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<div class="actionbar">
|
|
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
|
|
<i class="bi bi-list"></i>
|
|
</button>
|
|
|
|
<nav id="breadcrumb"></nav>
|
|
</div>
|
|
|
|
<article data-uid="EchoHub.Server.Controllers.ChannelsController">
|
|
|
|
|
|
|
|
<h1 id="EchoHub_Server_Controllers_ChannelsController" data-uid="EchoHub.Server.Controllers.ChannelsController" class="text-break">
|
|
Class ChannelsController <a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Controllers/ChannelsController.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h1>
|
|
|
|
<div class="facts text-secondary">
|
|
<dl><dt>Namespace</dt><dd><a class="xref" href="EchoHub.html">EchoHub</a>.<a class="xref" href="EchoHub.Server.html">Server</a>.<a class="xref" href="EchoHub.Server.Controllers.html">Controllers</a></dd></dl>
|
|
<dl><dt>Assembly</dt><dd>EchoHub.Server.dll</dd></dl>
|
|
</div>
|
|
|
|
<div class="markdown summary"></div>
|
|
<div class="markdown conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">[ApiController]
|
|
[Route("api/channels")]
|
|
[Authorize]
|
|
[EnableRateLimiting("general")]
|
|
public class ChannelsController : ControllerBase</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<dl class="typelist inheritance">
|
|
<dt>Inheritance</dt>
|
|
<dd>
|
|
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
|
|
<div><span class="xref">ControllerBase</span></div>
|
|
<div><span class="xref">ChannelsController</span></div>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="typelist inheritedMembers">
|
|
<dt>Inherited Members</dt>
|
|
<dd>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
|
|
</div>
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="section" id="constructors">Constructors
|
|
</h2>
|
|
|
|
|
|
<a id="EchoHub_Server_Controllers_ChannelsController__ctor_" data-uid="EchoHub.Server.Controllers.ChannelsController.#ctor*"></a>
|
|
|
|
<h3 id="EchoHub_Server_Controllers_ChannelsController__ctor_EchoHub_Core_Contracts_IChannelService_EchoHub_Server_Data_EchoHubDbContext_EchoHub_Server_Services_FileStorageService_EchoHub_Core_Services_ImageToAsciiService_System_Net_Http_IHttpClientFactory_EchoHub_Core_Contracts_IChatService_EchoHub_Core_Contracts_IMessageEncryptionService_EchoHub_Server_Config_UploadLimits_Microsoft_Extensions_Logging_ILogger_EchoHub_Server_Controllers_ChannelsController__" data-uid="EchoHub.Server.Controllers.ChannelsController.#ctor(EchoHub.Core.Contracts.IChannelService,EchoHub.Server.Data.EchoHubDbContext,EchoHub.Server.Services.FileStorageService,EchoHub.Core.Services.ImageToAsciiService,System.Net.Http.IHttpClientFactory,EchoHub.Core.Contracts.IChatService,EchoHub.Core.Contracts.IMessageEncryptionService,EchoHub.Server.Config.UploadLimits,Microsoft.Extensions.Logging.ILogger{EchoHub.Server.Controllers.ChannelsController})">
|
|
ChannelsController(IChannelService, EchoHubDbContext, FileStorageService, ImageToAsciiService, IHttpClientFactory, IChatService, IMessageEncryptionService, UploadLimits, ILogger<ChannelsController>)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Controllers/ChannelsController.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public ChannelsController(IChannelService channelService, EchoHubDbContext db, FileStorageService fileStorage, ImageToAsciiService asciiService, IHttpClientFactory httpClientFactory, IChatService chatService, IMessageEncryptionService encryption, UploadLimits uploadLimits, ILogger<ChannelsController> logger)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>channelService</code> <a class="xref" href="../core/EchoHub.Core.Contracts.IChannelService.html">IChannelService</a></dt>
|
|
<dd></dd>
|
|
<dt><code>db</code> <a class="xref" href="EchoHub.Server.Data.EchoHubDbContext.html">EchoHubDbContext</a></dt>
|
|
<dd></dd>
|
|
<dt><code>fileStorage</code> <a class="xref" href="EchoHub.Server.Services.FileStorageService.html">FileStorageService</a></dt>
|
|
<dd></dd>
|
|
<dt><code>asciiService</code> <a class="xref" href="../core/EchoHub.Core.Services.ImageToAsciiService.html">ImageToAsciiService</a></dt>
|
|
<dd></dd>
|
|
<dt><code>httpClientFactory</code> <span class="xref">IHttpClientFactory</span></dt>
|
|
<dd></dd>
|
|
<dt><code>chatService</code> <a class="xref" href="../core/EchoHub.Core.Contracts.IChatService.html">IChatService</a></dt>
|
|
<dd></dd>
|
|
<dt><code>encryption</code> <a class="xref" href="../core/EchoHub.Core.Contracts.IMessageEncryptionService.html">IMessageEncryptionService</a></dt>
|
|
<dd></dd>
|
|
<dt><code>uploadLimits</code> <a class="xref" href="EchoHub.Server.Config.UploadLimits.html">UploadLimits</a></dt>
|
|
<dd></dd>
|
|
<dt><code>logger</code> <span class="xref">ILogger</span><<a class="xref" href="EchoHub.Server.Controllers.ChannelsController.html">ChannelsController</a>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="section" id="methods">Methods
|
|
</h2>
|
|
|
|
|
|
<a id="EchoHub_Server_Controllers_ChannelsController_CreateChannel_" data-uid="EchoHub.Server.Controllers.ChannelsController.CreateChannel*"></a>
|
|
|
|
<h3 id="EchoHub_Server_Controllers_ChannelsController_CreateChannel_EchoHub_Core_DTOs_CreateChannelRequest_" data-uid="EchoHub.Server.Controllers.ChannelsController.CreateChannel(EchoHub.Core.DTOs.CreateChannelRequest)">
|
|
CreateChannel(CreateChannelRequest)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Controllers/ChannelsController.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">[HttpPost]
|
|
public Task<IActionResult> CreateChannel(CreateChannelRequest request)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>request</code> <a class="xref" href="../core/EchoHub.Core.DTOs.CreateChannelRequest.html">CreateChannelRequest</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><span class="xref">Task</span><<span class="xref">IActionResult</span>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Server_Controllers_ChannelsController_DeleteChannel_" data-uid="EchoHub.Server.Controllers.ChannelsController.DeleteChannel*"></a>
|
|
|
|
<h3 id="EchoHub_Server_Controllers_ChannelsController_DeleteChannel_System_String_" data-uid="EchoHub.Server.Controllers.ChannelsController.DeleteChannel(System.String)">
|
|
DeleteChannel(string)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Controllers/ChannelsController.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">[HttpDelete("{channel}")]
|
|
public Task<IActionResult> DeleteChannel(string channel)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>channel</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><span class="xref">Task</span><<span class="xref">IActionResult</span>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Server_Controllers_ChannelsController_GetChannelCrypto_" data-uid="EchoHub.Server.Controllers.ChannelsController.GetChannelCrypto*"></a>
|
|
|
|
<h3 id="EchoHub_Server_Controllers_ChannelsController_GetChannelCrypto_System_String_" data-uid="EchoHub.Server.Controllers.ChannelsController.GetChannelCrypto(System.String)">
|
|
GetChannelCrypto(string)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Controllers/ChannelsController.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Public crypto metadata for a channel: whether it is end-to-end encrypted and the
|
|
PBKDF2 salt clients need to derive their join credential. Never returns the
|
|
wrapped room key — that is only handed out after a successful join.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">[HttpGet("{channel}/crypto")]
|
|
public Task<IActionResult> GetChannelCrypto(string channel)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>channel</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><span class="xref">Task</span><<span class="xref">IActionResult</span>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Server_Controllers_ChannelsController_GetChannelMeta_" data-uid="EchoHub.Server.Controllers.ChannelsController.GetChannelMeta*"></a>
|
|
|
|
<h3 id="EchoHub_Server_Controllers_ChannelsController_GetChannelMeta_System_String_" data-uid="EchoHub.Server.Controllers.ChannelsController.GetChannelMeta(System.String)">
|
|
GetChannelMeta(string)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Controllers/ChannelsController.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Human-facing summary of a channel (message count, unique posters, estimated size,
|
|
created date, room id). Available for encrypted channels too — these are metadata the
|
|
server tracks even though it cannot read the messages themselves.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">[HttpGet("{channel}/meta")]
|
|
public Task<IActionResult> GetChannelMeta(string channel)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>channel</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><span class="xref">Task</span><<span class="xref">IActionResult</span>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Server_Controllers_ChannelsController_GetChannels_" data-uid="EchoHub.Server.Controllers.ChannelsController.GetChannels*"></a>
|
|
|
|
<h3 id="EchoHub_Server_Controllers_ChannelsController_GetChannels_System_Int32_System_Int32_" data-uid="EchoHub.Server.Controllers.ChannelsController.GetChannels(System.Int32,System.Int32)">
|
|
GetChannels(int, int)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Controllers/ChannelsController.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">[HttpGet]
|
|
public Task<IActionResult> GetChannels(int offset = 0, int limit = 50)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>offset</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd></dd>
|
|
<dt><code>limit</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><span class="xref">Task</span><<span class="xref">IActionResult</span>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Server_Controllers_ChannelsController_RekeyChannel_" data-uid="EchoHub.Server.Controllers.ChannelsController.RekeyChannel*"></a>
|
|
|
|
<h3 id="EchoHub_Server_Controllers_ChannelsController_RekeyChannel_System_String_EchoHub_Core_DTOs_RekeyChannelRequest_" data-uid="EchoHub.Server.Controllers.ChannelsController.RekeyChannel(System.String,EchoHub.Core.DTOs.RekeyChannelRequest)">
|
|
RekeyChannel(string, RekeyChannelRequest)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Controllers/ChannelsController.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Changes an encrypted channel's passphrase by re-wrapping its room key.
|
|
The caller proves knowledge of the old passphrase via the old auth key;
|
|
history is never re-encrypted (the room content key does not change).</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">[HttpPost("{channel}/rekey")]
|
|
public Task<IActionResult> RekeyChannel(string channel, RekeyChannelRequest request)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>channel</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
<dt><code>request</code> <a class="xref" href="../core/EchoHub.Core.DTOs.RekeyChannelRequest.html">RekeyChannelRequest</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><span class="xref">Task</span><<span class="xref">IActionResult</span>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Server_Controllers_ChannelsController_SendMessageWithAttachments_" data-uid="EchoHub.Server.Controllers.ChannelsController.SendMessageWithAttachments*"></a>
|
|
|
|
<h3 id="EchoHub_Server_Controllers_ChannelsController_SendMessageWithAttachments_System_String_System_String_" data-uid="EchoHub.Server.Controllers.ChannelsController.SendMessageWithAttachments(System.String,System.String)">
|
|
SendMessageWithAttachments(string, string?)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Controllers/ChannelsController.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Sends one message carrying optional text (<code>content</code> form field) plus zero or more
|
|
file attachments (Discord-style). For non-encrypted channels the server sniffs each file's
|
|
kind and renders ASCII previews for images. For end-to-end encrypted channels the client
|
|
uploads ciphertext blobs and declares each file's kind (<code>kind</code>) and pre-rendered,
|
|
room-encrypted preview (<code>preview</code>), aligned by file order — the server never inspects them.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">[HttpPost("{channel}/messages")]
|
|
[EnableRateLimiting("upload")]
|
|
public Task<IActionResult> SendMessageWithAttachments(string channel, string? size = null)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>channel</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
<dt><code>size</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><span class="xref">Task</span><<span class="xref">IActionResult</span>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Server_Controllers_ChannelsController_SendUrl_" data-uid="EchoHub.Server.Controllers.ChannelsController.SendUrl*"></a>
|
|
|
|
<h3 id="EchoHub_Server_Controllers_ChannelsController_SendUrl_System_String_EchoHub_Core_DTOs_SendUrlRequest_System_String_" data-uid="EchoHub.Server.Controllers.ChannelsController.SendUrl(System.String,EchoHub.Core.DTOs.SendUrlRequest,System.String)">
|
|
SendUrl(string, SendUrlRequest, string?)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Controllers/ChannelsController.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">[HttpPost("{channel}/send-url")]
|
|
[EnableRateLimiting("upload")]
|
|
public Task<IActionResult> SendUrl(string channel, SendUrlRequest request, string? size = null)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>channel</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
<dt><code>request</code> <a class="xref" href="../core/EchoHub.Core.DTOs.SendUrlRequest.html">SendUrlRequest</a></dt>
|
|
<dd></dd>
|
|
<dt><code>size</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><span class="xref">Task</span><<span class="xref">IActionResult</span>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Server_Controllers_ChannelsController_UpdateTopic_" data-uid="EchoHub.Server.Controllers.ChannelsController.UpdateTopic*"></a>
|
|
|
|
<h3 id="EchoHub_Server_Controllers_ChannelsController_UpdateTopic_System_String_EchoHub_Core_DTOs_UpdateTopicRequest_" data-uid="EchoHub.Server.Controllers.ChannelsController.UpdateTopic(System.String,EchoHub.Core.DTOs.UpdateTopicRequest)">
|
|
UpdateTopic(string, UpdateTopicRequest)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Controllers/ChannelsController.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">[HttpPut("{channel}/topic")]
|
|
public Task<IActionResult> UpdateTopic(string channel, UpdateTopicRequest request)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>channel</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
<dt><code>request</code> <a class="xref" href="../core/EchoHub.Core.DTOs.UpdateTopicRequest.html">UpdateTopicRequest</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><span class="xref">Task</span><<span class="xref">IActionResult</span>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
|
|
<div class="contribution d-print-none">
|
|
<a href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Server/Controllers/ChannelsController.cs" class="edit-link">Edit this page</a>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="affix">
|
|
<nav id="affix"></nav>
|
|
</div>
|
|
</main>
|
|
|
|
<div class="container-xxl search-results" id="search-results"></div>
|
|
|
|
<footer class="border-top text-secondary">
|
|
<div class="container-xxl">
|
|
<div class="flex-fill">
|
|
<div class='footer-custom'><div class='footer-inner'><span class='footer-brand'>EchoHub</span><span class='footer-sep'>·</span><a href='https://github.com/HueByte/EchoHub'>GitHub</a><span class='footer-sep'>·</span><a href='https://echohub.voidcube.cloud'>Website</a></div></div>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|