mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-02 09:22:11 +08:00
fix: method name
This commit is contained in:
parent
c4fe8ea2f6
commit
df77133962
@ -62,7 +62,7 @@ func (o *OfflinePushConsumerHandler) handleMsg2OfflinePush(ctx context.Context,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *OfflinePushConsumerHandler) getOfflinePushInfos(msg *sdkws.MsgData) (title, content string, opts *options.Opts, err error) {
|
func (o *OfflinePushConsumerHandler) getOfflinePushInfos(msg *sdkws.MsgData) (title, content string, opts *options.Opts, err error) {
|
||||||
type AtTextElem struct {
|
type AtTextElem struct {
|
||||||
Text string `json:"text,omitempty"`
|
Text string `json:"text,omitempty"`
|
||||||
AtUserList []string `json:"atUserList,omitempty"`
|
AtUserList []string `json:"atUserList,omitempty"`
|
||||||
@ -107,12 +107,12 @@ func (c *OfflinePushConsumerHandler) getOfflinePushInfos(msg *sdkws.MsgData) (ti
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *OfflinePushConsumerHandler) offlinePushMsg(ctx context.Context, msg *sdkws.MsgData, offlinePushUserIDs []string) error {
|
func (o *OfflinePushConsumerHandler) offlinePushMsg(ctx context.Context, msg *sdkws.MsgData, offlinePushUserIDs []string) error {
|
||||||
title, content, opts, err := c.getOfflinePushInfos(msg)
|
title, content, opts, err := o.getOfflinePushInfos(msg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
err = c.offlinePusher.Push(ctx, offlinePushUserIDs, title, content, opts)
|
err = o.offlinePusher.Push(ctx, offlinePushUserIDs, title, content, opts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
prommetrics.MsgOfflinePushFailedCounter.Inc()
|
prommetrics.MsgOfflinePushFailedCounter.Inc()
|
||||||
return err
|
return err
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user