Skip to content

Commit

Permalink
Merge pull request #25 from alkem-io/develop
Browse files Browse the repository at this point in the history
Release: Updated Message Interface
  • Loading branch information
valentinyanakiev authored Jun 14, 2023
2 parents 43e2629 + f721f1f commit b609f34
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 17 deletions.
4 changes: 2 additions & 2 deletions lib/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alkemio/matrix-adapter-lib",
"version": "0.3.5",
"version": "0.3.6",
"description": "Library for interacting with Alkemio Matrix Adapter service",
"author": "Alkemio Foundation",
"private": false,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/types/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export class IMessage {

timestamp!: number;

reactions?: IReaction[];
reactions!: IReaction[];
}
2 changes: 1 addition & 1 deletion lib/src/types/room.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IMessage } from "./message";
import { IMessage } from './message';

export class RoomResult {
id!: string;
Expand Down
18 changes: 9 additions & 9 deletions service/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alkemio-matrix-adapter",
"version": "0.3.0",
"version": "0.3.1",
"description": "Alkemio Matrix Adapter service",
"author": "Alkemio Foundation",
"private": false,
Expand Down Expand Up @@ -34,7 +34,7 @@
"typeorm": "ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js --config src/config/typeorm.cli.config.ts"
},
"dependencies": {
"@alkemio/matrix-adapter-lib": "^0.3.5",
"@alkemio/matrix-adapter-lib": "^0.3.6",
"@nestjs/axios": "^2.0.0",
"@nestjs/common": "^9.4.0",
"@nestjs/config": "^2.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export class CommunicationAdapter {
message: message,
sender: sendMessageData.senderID,
timestamp: timestamp,
reactions: [],
};
}

Expand Down Expand Up @@ -167,6 +168,8 @@ export class CommunicationAdapter {
message: message,
sender: sendMessageData.senderID,
timestamp: timestamp,
reactions: [],
threadID: sendMessageData.threadID,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ export class MatrixRoomAdapter {
}
}
for (const message of messages) {
message.reactions = reactionsMap.get(message.id);
message.reactions = reactionsMap.get(message.id) ?? [];
}

this.logger.verbose?.(
Expand Down

0 comments on commit b609f34

Please sign in to comment.