Release 1.9.6 (#2021)

* Change accès token with query privateAccessToken in the url

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>

* Add play uri param

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>

* PlayUri parameter

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>

* removed unused imports

* send group userIds to players

* sending info about group lock state. wip

* listening to lockGroupMessage on front

* cleanup

* Updating GroupDescriptors on LockGroupMessage

* remove console logs

* group circles with color fill

* fix GameRoom text

* remove obsolete check

* cr fixes #1 wip

* much cleaner approach to group lock update

* fix compilation error

* well-known values wip

* Removing old unused images

Just a bit of cleanup!

* update with dan suggest

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>

* Change roomId by playUri

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>

* hide voice indicator for player leaving still existing bubble conversation

* Refactor access by token

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>

* Refactor connexion manager

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>

* Adds settings options and localUser functions

* PrivacyShutdownStore modifies constraints according to the user's setting

* switches dropdown for checkboxes and adjusts wording

* Adds the todo about German translation

* Adds test map

* Makes the default setting: camera off and mic on

* Add z-index on embeds screens and action menu

* Fixes tileset import

* Adds settings options and localUser functions

* PrivacyShutdownStore modifies constraints according to the user's setting

* switches dropdown for checkboxes and adjusts wording

* Adds the todo about German translation

* Adds test map

* Makes the default setting: camera off and mic on

* Fixes tileset import

* Applying German translation, thanks to @Lurkars

* removed obsolete console.log

* fix linter issues

* make use of proto well knows types

* fixed types for RoomConnection

* fix locking bubble when returning from away mode

* Fix run pretty

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>

* prevent actions menu from appearing when inserting space key on chat

* Bump ansi-regex from 4.1.0 to 4.1.1 in /maps

Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump minimist from 1.2.5 to 1.2.6 in /desktop/local-app

Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump ansi-regex from 4.1.0 to 4.1.1 in /desktop/electron

Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump ansi-regex from 4.1.0 to 4.1.1 in /uploader

Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump plist from 3.0.4 to 3.0.5 in /desktop/electron

Bumps [plist](https://github.com/TooTallNate/node-plist) from 3.0.4 to 3.0.5.
- [Release notes](https://github.com/TooTallNate/node-plist/releases)
- [Changelog](https://github.com/TooTallNate/plist.js/blob/master/History.md)
- [Commits](https://github.com/TooTallNate/node-plist/commits)

---
updated-dependencies:
- dependency-name: plist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: Hanusiak Piotr <piotr@ltmp.co>
Co-authored-by: David Négrier <d.negrier@thecodingmachine.com>
Co-authored-by: Piotr 'pwh' Hanusiak <p.hanusiak@workadventu.re>
Co-authored-by: Benedicte Quimbert <b.quimbert@workadventu.re>
Co-authored-by: Alexis Faizeau <a.faizeau@workadventu.re>
Co-authored-by: Bénédicte Q <37311765+HimeShaman@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
grégoire parant
2022-03-30 11:13:27 +02:00
committed by GitHub
parent 987325e787
commit 003bc86262
43 changed files with 533 additions and 98 deletions
@@ -320,10 +320,11 @@ export class AuthenticateController extends BaseHttpController {
//todo: what to do if the organizationMemberToken is already used?
const organizationMemberToken: string | null = param.organizationMemberToken;
const playUri: string | null = param.playUri;
try {
if (typeof organizationMemberToken != "string") throw new Error("No organization token");
const data = await adminApi.fetchMemberDataByToken(organizationMemberToken);
const data = await adminApi.fetchMemberDataByToken(organizationMemberToken, playUri);
const userUuid = data.userUuid;
const email = data.email;
const roomUrl = data.roomUrl;
@@ -21,6 +21,7 @@ import {
FollowConfirmationMessage,
FollowAbortMessage,
VariableMessage,
LockGroupPromptMessage,
} from "../Messages/generated/messages_pb";
import { UserMovesMessage } from "../Messages/generated/messages_pb";
import { parse } from "query-string";
@@ -561,6 +562,11 @@ export class IoSocketController {
);
} else if (message.hasFollowabortmessage()) {
socketManager.handleFollowAbort(client, message.getFollowabortmessage() as FollowAbortMessage);
} else if (message.hasLockgrouppromptmessage()) {
socketManager.handleLockGroup(
client,
message.getLockgrouppromptmessage() as LockGroupPromptMessage
);
}
/* Ok is false if backpressure was built up, wait for drain */
@@ -13,14 +13,14 @@ export class OpenIdProfileController extends BaseHttpController {
}
try {
const resCheckTokenAuth = await openIDClient.checkTokenAuth(accessToken as string);
if (!resCheckTokenAuth.email) {
if (!resCheckTokenAuth.sub) {
throw new Error("Email was not found");
}
res.send(
this.buildHtml(
OPID_CLIENT_ISSUER,
resCheckTokenAuth.email as string,
resCheckTokenAuth.picture as string | undefined
resCheckTokenAuth.sub
/*resCheckTokenAuth.picture as string | undefined*/
)
);
return;
+15 -6
View File
@@ -22,6 +22,7 @@ import {
import { ClientReadableStream } from "grpc";
import { PositionDispatcher } from "_Model/PositionDispatcher";
import Debug from "debug";
import { BoolValue, UInt32Value } from "google-protobuf/google/protobuf/wrappers_pb";
const debug = Debug("zone");
@@ -123,19 +124,25 @@ export class UserDescriptor {
}
export class GroupDescriptor {
private constructor(public readonly groupId: number, private groupSize: number, private position: PointMessage) {}
private constructor(
public readonly groupId: number,
private groupSize: number | undefined,
private position: PointMessage,
private locked: boolean | undefined
) {}
public static createFromGroupUpdateZoneMessage(message: GroupUpdateZoneMessage): GroupDescriptor {
const position = message.getPosition();
if (position === undefined) {
throw new Error("Missing position");
}
return new GroupDescriptor(message.getGroupid(), message.getGroupsize(), position);
return new GroupDescriptor(message.getGroupid(), message.getGroupsize(), position, message.getLocked());
}
public update(groupDescriptor: GroupDescriptor) {
this.groupSize = groupDescriptor.groupSize;
this.position = groupDescriptor.position;
this.locked = groupDescriptor.locked;
}
public toGroupUpdateMessage(): GroupUpdateMessage {
@@ -144,9 +151,13 @@ export class GroupDescriptor {
throw new Error("GroupDescriptor.groupId is not an integer: " + this.groupId);
}
groupUpdateMessage.setGroupid(this.groupId);
groupUpdateMessage.setGroupsize(this.groupSize);
if (this.groupSize !== undefined) {
groupUpdateMessage.setGroupsize(new UInt32Value().setValue(this.groupSize));
}
groupUpdateMessage.setPosition(this.position);
if (this.locked !== undefined) {
groupUpdateMessage.setLocked(new BoolValue().setValue(this.locked));
}
return groupUpdateMessage;
}
}
@@ -206,9 +217,7 @@ export class Zone {
this.notifyGroupMove(groupDescriptor);
} else {
this.groups.set(groupId, groupDescriptor);
const fromZone = groupUpdateZoneMessage.getFromzone();
this.notifyGroupEnter(groupDescriptor, fromZone?.toObject());
}
} else if (message.hasUserleftzonemessage()) {
+9 -3
View File
@@ -61,7 +61,7 @@ class AdminApi {
async fetchMemberDataByUuid(
userIdentifier: string | null,
roomId: string,
playUri: string,
ipAddress: string,
characterLayers: string[]
): Promise<FetchMemberDataByUuidResponse> {
@@ -69,7 +69,12 @@ class AdminApi {
return Promise.reject(new Error("No admin backoffice set!"));
}
const res = await Axios.get<unknown, AxiosResponse<unknown>>(ADMIN_API_URL + "/api/room/access", {
params: { userIdentifier, roomId, ipAddress, characterLayers },
params: {
userIdentifier,
playUri,
ipAddress,
characterLayers,
},
headers: { Authorization: `${ADMIN_API_TOKEN}` },
paramsSerializer: (p) => {
return qs.stringify(p, { arrayFormat: "brackets" });
@@ -84,12 +89,13 @@ class AdminApi {
return res.data;
}
async fetchMemberDataByToken(organizationMemberToken: string): Promise<AdminApiData> {
async fetchMemberDataByToken(organizationMemberToken: string, playUri: string | null): Promise<AdminApiData> {
if (!ADMIN_API_URL) {
return Promise.reject(new Error("No admin backoffice set!"));
}
//todo: this call can fail if the corresponding world is not activated or if the token is invalid. Handle that case.
const res = await Axios.get(ADMIN_API_URL + "/api/login-url/" + organizationMemberToken, {
params: { playUri },
headers: { Authorization: `${ADMIN_API_TOKEN}` },
});
if (!isAdminApiData(res.data)) {
+7
View File
@@ -38,6 +38,7 @@ import {
ErrorMessage,
WorldFullMessage,
PlayerDetailsUpdatedMessage,
LockGroupPromptMessage,
InvalidTextureMessage,
} from "../Messages/generated/messages_pb";
import { ProtobufUtils } from "../Model/Websocket/ProtobufUtils";
@@ -297,6 +298,12 @@ export class SocketManager implements ZoneEventListener {
client.backConnection.write(pusherToBackMessage);
}
handleLockGroup(client: ExSocketInterface, message: LockGroupPromptMessage): void {
const pusherToBackMessage = new PusherToBackMessage();
pusherToBackMessage.setLockgrouppromptmessage(message);
client.backConnection.write(pusherToBackMessage);
}
onEmote(emoteMessage: EmoteEventMessage, listener: ExSocketInterface): void {
const subMessage = new SubMessage();
subMessage.setEmoteeventmessage(emoteMessage);