Comments (7)
- 我目前的问题和缺陷#1423一致,我可以通过turms-gateway的userRepository对用户做一个简单的存储,但是在用户建立好友关系的请求中,因为缺少userVersion的数据,导致无法查找好友邀请关系数据,详细代码为
- 所以,请问作者有什么好的方案提供到我访问userVersion?
from turms.
I will add a new RPC method that can call any methods in peer servers this weekend.
After that, you can use the code like:
getContext().getBean(RpcService.class).request("userService", "createUser", ...)
in your plugin.
I will @ you and give a complete example when I publish it.
from turms.
You can use the following code in your plugins for turms-gateway to request turms-service to create a user currently:
getContext().getBean(RpcService.class)
.requestResponse(new CreateUserRequest(...))
.subscribe(userId -> {
LOGGER.info("Created user {}", userId);
});
The previous proposal has been rejected mainly because Turms internal APIs change frequently, and it will make the plugins that call Turms server-internal APIs break frequently even if the plugin compiles successfully.
from turms.
@JamesChenX 请问,新增的RPCService没有暴露userVersion的接口吧,目前我在最新的代码是没有找到这个接口,即使我可以在turms-gateway添加用户,但是由于我缺少userVersion的数据,好友查询数据无法通过接口查询,其他使用到userVersion的接口依旧这个问题。
from turms.
getContext().getBean(RpcService.class) requestResponse(new CreateUserRequest(...))
will not only create the user record, but also the user version record, which is used to provide a solution for your first requirement UserAuthenticator插件验证时写入用户到user表,但是我无法写入userVersion数据
由于我缺少userVersion的数据,好友查询数据无法通过接口查询,其他使用到userVersion的接口依旧这个问题。
The business logic should be implemented in turms-service instead of turms-gateway. turms-gateway is designed not to be business-aware, and should not need to know find friends
, etc.
from turms.
我使用UserAuthenticator插件接入第三方用户到turms,以致于我必须在插件写入用户,这样turms拥有了这个用户数据,然后我通过turms-service接口发起用户好友请求,由于我在plugin写入用户时缺少userVersion数据,无法查询到我发起的好友请求,致使我无法完成好友认证功能。
from turms.
我知道turms-gateway不需要具备业务,但是turms-service是具备业务的,我在turms-servic只有用户数据,没有userVersion的dateTime数据(如上面截图红框所示),好多业务接口都无法查询到数据。
from turms.
Related Issues (20)
- 怎么拓展业务信息,如群组标签等等 HOT 7
- Support getting the trace ID for admin APIs from the user-defined HTTP header
- TurmsMapCodec valueCodec ? HOT 2
- Message Reaction HOT 3
- recallMessage()没有更新旧消息的RECALL_DATE HOT 2
- messageService.queryMessagesWithTotal 疑问 HOT 4
- admin 消息查询无数据显示 HOT 2
- MessageService.queryMessagesWithTotal批量获取消息总数时,只返回了一个 HOT 3
- 关于private-conversation的sequenceId的疑问 HOT 2
- 多端登录如何生效? HOT 2
- Provide a local test environement preset HOT 1
- Translate exception caused by Jackson when deserializing requests to provide more informational and friendly error messages in admin APIs
- Support storing and querying the IPv6 address of the message sender
- updateStatusIfPending 会设置responseDate字段的值到mongo吗? HOT 1
- Distinguish login name, display name, and user ID of admin users in admin APIs and entities to make code clear and not confuse admin users HOT 1
- Unify the metric names to follow the same naming convention
- 关于如何发送自定义的通知内容 HOT 2
- 多端登录配置
- Redis可视化 HOT 1
- CollectionUtil.isImmutable(Iterable<?> iterable) 不可变判断 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from turms.