feat(chat): 实现聊天界面功能并完善文档说明
- 新增AttachmentRepository处理图片、视频、音频、文件发送功能 - 实现AuthRepository管理用户认证和会话状态 - 添加EnvironmentRepository支持环境配置切换 - 完成ChatScreen界面实现,包含消息收发、媒体文件处理 - 更新设计文档补充Android聊天页历史加载和测试验证说明 - 添加联系人黑名单错误信息返回和IM验证流程调整说明
这个提交包含在:
父节点
f6c06db04b
当前提交
ca5fa5720b
@ -19,6 +19,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.client.RestClientException;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
import org.springframework.web.util.UriComponentsBuilder;
|
||||
import java.net.URI;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Map;
|
||||
@ -139,12 +140,14 @@ public class DemoAuthService {
|
||||
String payload = AppRequestSignatureUtil.payload(appId, userId, effectiveNickname, null, timestamp, nonce);
|
||||
String signature = AppRequestSignatureUtil.sign(appSecret, payload);
|
||||
|
||||
String url = UriComponentsBuilder.fromHttpUrl(imServiceUrl)
|
||||
URI uri = UriComponentsBuilder.fromHttpUrl(imServiceUrl)
|
||||
.path("/api/im/auth/login")
|
||||
.queryParam("appId", appId)
|
||||
.queryParam("userId", userId)
|
||||
.queryParam("nickname", effectiveNickname)
|
||||
.toUriString();
|
||||
.encode()
|
||||
.build()
|
||||
.toUri();
|
||||
|
||||
try {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
@ -152,7 +155,7 @@ public class DemoAuthService {
|
||||
headers.set("X-App-Nonce", nonce);
|
||||
headers.set("X-App-Signature", signature);
|
||||
ResponseEntity<JsonNode> response = restTemplate.exchange(
|
||||
url,
|
||||
uri,
|
||||
HttpMethod.POST,
|
||||
new HttpEntity<>(headers),
|
||||
JsonNode.class
|
||||
|
||||
正在加载...
在新工单中引用
屏蔽一个用户