mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-14 14:05:59 +08:00
ws update
This commit is contained in:
@@ -81,6 +81,15 @@ func GetOpUserPlatform(ctx context.Context) string {
|
||||
}
|
||||
return ""
|
||||
}
|
||||
func GetRemoteAddr(ctx context.Context) string {
|
||||
if ctx.Value(constant.RemoteAddr) != "" {
|
||||
s, ok := ctx.Value(constant.RemoteAddr).(string)
|
||||
if ok {
|
||||
return s
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func GetMustCtxInfo(ctx context.Context) (operationID, opUserID, platform, connID string, err error) {
|
||||
operationID, ok := ctx.Value(constant.OperationID).(string)
|
||||
|
||||
Reference in New Issue
Block a user