2017-11-20 22:18:00 +00:00
|
|
|
import * as types from './actionsTypes';
|
|
|
|
|
2020-04-30 17:53:35 +00:00
|
|
|
export function subscribeRoom(rid) {
|
|
|
|
return {
|
|
|
|
type: types.ROOM.SUBSCRIBE,
|
|
|
|
rid
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export function unsubscribeRoom(rid) {
|
|
|
|
return {
|
|
|
|
type: types.ROOM.UNSUBSCRIBE,
|
|
|
|
rid
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2021-06-07 16:18:14 +00:00
|
|
|
export function leaveRoom(roomType, room, selected) {
|
2018-03-23 16:49:51 +00:00
|
|
|
return {
|
|
|
|
type: types.ROOM.LEAVE,
|
2021-06-07 16:18:14 +00:00
|
|
|
room,
|
|
|
|
roomType,
|
|
|
|
selected
|
2018-03-23 16:49:51 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-03-20 16:38:01 +00:00
|
|
|
export function deleteRoom(rid, t) {
|
2018-03-29 17:55:37 +00:00
|
|
|
return {
|
2020-03-20 16:38:01 +00:00
|
|
|
type: types.ROOM.DELETE,
|
2018-12-05 20:52:08 +00:00
|
|
|
rid,
|
|
|
|
t
|
2018-03-29 17:55:37 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-05-08 17:36:10 +00:00
|
|
|
export function closeRoom(rid) {
|
|
|
|
return {
|
|
|
|
type: types.ROOM.CLOSE,
|
|
|
|
rid
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export function forwardRoom(rid, transferData) {
|
|
|
|
return {
|
|
|
|
type: types.ROOM.FORWARD,
|
|
|
|
transferData,
|
|
|
|
rid
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-03-20 16:38:01 +00:00
|
|
|
export function removedRoom() {
|
2020-03-06 13:13:24 +00:00
|
|
|
return {
|
2020-03-20 16:38:01 +00:00
|
|
|
type: types.ROOM.REMOVED
|
2020-03-06 13:13:24 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2019-04-08 12:35:28 +00:00
|
|
|
export function userTyping(rid, status = true) {
|
2017-11-21 16:55:32 +00:00
|
|
|
return {
|
2017-11-21 17:09:22 +00:00
|
|
|
type: types.ROOM.USER_TYPING,
|
2019-04-08 12:35:28 +00:00
|
|
|
rid,
|
2017-11-21 16:55:32 +00:00
|
|
|
status
|
|
|
|
};
|
|
|
|
}
|