Skip to content

[BUG] OpenIMSDKRN.getTotalUnreadMsgCount(); returns a str instead of number #83

Description

@k88936

OpenIM Server Version

openim/openim-server:v3.8.3-patch.9

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Docker Deployment

Bug Description and Steps to Reproduce

getUnReadCountByReq: async () => {
      try {
          const data = await OpenIMSDKRN.getTotalUnreadMsgCount(uuidv4());
          set(() => ({unReadCount: data}));
          return data;
      } catch (error) {
          console.error(error);
          return 0;
      }
  },

from:
https://github.com/openimsdk/openim-reactnative-demo/blob/2a4d214103bab38da793f45c44506b299e686ba4/src/store/conversation.ts#L102-L111

the data returned from sdk is actually a string, ( because 0+ it + 0 makes '020') instead of a number described in sdk type spec

Screenshots Link

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions