Skip to content

Commit 1190066

Browse files
committed
rename service folder
1 parent 3d44d16 commit 1190066

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

hooks/useInitiate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { InitiateProps, initiate } from "../Services";
1+
import { InitiateProps, initiate } from "../service";
22

33
import { useCallback, useContext, useEffect, useState } from "react";
44
import { CommtContext } from "../context/Context";

hooks/useSetRooms.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useContext } from "react";
22
import { CommtContext } from "../context/Context";
33
import { setRooms } from "../context/actions/roomsActions";
44
import { RoomProps } from "../context/reducers/roomsReducer";
5-
import { getRoomsReadToken } from "../Services";
5+
import { getRoomsReadToken } from "../service";
66
import { IndicatorProps } from "../context/reducers/appReducer";
77

88
const useSetRooms = () => {

hooks/useSetUsers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useContext } from "react";
22
import { CommtContext } from "../context/Context";
33
import { setUsers } from "../context/actions/usersActions";
44
import { UserProps } from "../context/reducers/usersReducer";
5-
import { getUsersOnlineInfo } from "../Services";
5+
import { getUsersOnlineInfo } from "../service";
66
import { IndicatorProps } from "../context/reducers/appReducer";
77

88
const useSetUsers = () => {
File renamed without changes.

Services/index.ts renamed to service/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { UserProps } from "../context/reducers/usersReducer";
22
import axios from "./Axios";
33
import { ConfigsProps } from "../context/reducers/appReducer";
44
import { RoomProps } from "../context/reducers/roomsReducer";
5+
import PackageJson from "../package.json";
56

67
interface AuthKeysProps {
78
apiKey: string;
@@ -30,6 +31,11 @@ type ReadTokenReturnProps = Pick<
3031
"chatRoomAuthId" | "lastMessageReadToken"
3132
>;
3233

34+
const project = {
35+
name: "React Native SDK",
36+
version: PackageJson.version,
37+
};
38+
3339
export const initiate = async (props: InitiateProps) => {
3440
const { tenantId, apiKey, subscriptionKey } = props;
3541

@@ -40,6 +46,8 @@ export const initiate = async (props: InitiateProps) => {
4046
params: {
4147
tenantId,
4248
plugin: true, // This is for backend compatibility
49+
project: project.name, // This is for backend compatibility & analytics
50+
version: project.version, // This is for backend compatibility & analytics
4351
},
4452
headers: {
4553
apiKey,

0 commit comments

Comments
 (0)