后端:
1、事件订阅增加rabbitmq中间件 移动端: 1、完善移动端目录结构和代码框架
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using IM_API.Domain.Events;
|
||||
using IM_API.Models;
|
||||
using MassTransit;
|
||||
|
||||
namespace IM_API.Application.EventHandlers.FriendAddHandler
|
||||
{
|
||||
public class FriendAddSignalRHandler : IConsumer<FriendAddEvent>
|
||||
{
|
||||
private readonly ImContext _context;
|
||||
public FriendAddSignalRHandler(ImContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public Task Consume(ConsumeContext<FriendAddEvent> context)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
var @event = context.Message;
|
||||
|
||||
var RequestfriendShip = new Friend()
|
||||
{
|
||||
Avatar = @event.ResponseUser.Avatar,
|
||||
UserId = @event.RequestUser.Id,
|
||||
RemarkName = @event.RequestInfo.NickName,
|
||||
Created = @event.RequestInfo.Created,
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user