Skip to content

Commit

Permalink
Merge pull request #4218 from alkem-io/develop
Browse files Browse the repository at this point in the history
Patch for looking up community for event; matrix adapter payloads
  • Loading branch information
techsmyth authored Jul 6, 2024
2 parents f640ea0 + 0982e0d commit a49b4de
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alkemio-server",
"version": "0.83.0",
"version": "0.83.1",
"description": "Alkemio server, responsible for managing the shared Alkemio platform",
"author": "Alkemio Foundation",
"private": false,
Expand Down
10 changes: 6 additions & 4 deletions src/domain/community/community/community.service.events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class CommunityEventsService {

public async processCommunityNewMemberEvents(
community: ICommunity,
spaceID: string,
rootSpaceID: string,
displayName: string,
agentInfo: AgentInfo,
newContributor: IContributor
Expand All @@ -50,14 +50,16 @@ export class CommunityEventsService {

// Record the contribution events
const space =
await this.communityResolverService.getSpaceForCommunityOrFail(spaceID);
await this.communityResolverService.getSpaceForCommunityOrFail(
community.id
);
switch (space.type) {
case SpaceType.SPACE:
this.contributionReporter.spaceJoined(
{
id: community.parentID,
name: displayName,
space: spaceID,
space: rootSpaceID,
},
{
id: agentInfo.userID,
Expand All @@ -70,7 +72,7 @@ export class CommunityEventsService {
{
id: community.parentID,
name: displayName,
space: spaceID,
space: rootSpaceID,
},
{
id: agentInfo.userID,
Expand Down
2 changes: 1 addition & 1 deletion src/domain/community/user/user.resolver.fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class UserResolverFields {
agentInfo,
profile.authorization,
AuthorizationPrivilege.READ,
`read profile on User: ${profile.displayName}`
`read profile on User: ${profile.displayName} with current user being: ${agentInfo.userID}`
);
return profile;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class CommunicationAdapter {
): Promise<IMessage> {
const eventType = MatrixAdapterEventType.ROOM_SEND_MESSAGE;
const inputPayload: RoomSendMessagePayload = {
triggeredBy: '',
triggeredBy: sendMessageData.senderCommunicationsID,
roomID: sendMessageData.roomID,
message: sendMessageData.message,
senderID: sendMessageData.senderCommunicationsID,
Expand Down Expand Up @@ -228,7 +228,7 @@ export class CommunicationAdapter {
): Promise<string> {
const eventType = MatrixAdapterEventType.ROOM_REMOVE_REACTION_TO_MESSAGE;
const inputPayload: RoomRemoveMessageReactionPayload = {
triggeredBy: '',
triggeredBy: removeReactionData.senderCommunicationsID,
roomID: removeReactionData.roomID,
reactionID: removeReactionData.reactionID,
senderID: removeReactionData.senderCommunicationsID,
Expand Down Expand Up @@ -319,7 +319,7 @@ export class CommunicationAdapter {
): Promise<string> {
const eventType = MatrixAdapterEventType.ROOM_DELETE_MESSAGE;
const inputPayload: RoomDeleteMessagePayload = {
triggeredBy: '',
triggeredBy: deleteMessageData.senderCommunicationsID,
roomID: deleteMessageData.roomID,
messageID: deleteMessageData.messageId,
senderID: deleteMessageData.senderCommunicationsID,
Expand Down

0 comments on commit a49b4de

Please sign in to comment.