-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(notifications): adapt to new auth method and messages api
- Loading branch information
Showing
9 changed files
with
55 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
import { Microservice } from "./commons/service"; | ||
import { NotificationsServiceConfiguration } from "./configuration"; | ||
|
||
process.on("SIGTERM", async () => { | ||
console.log("Shutting down notifications service"); | ||
process.exit(0); | ||
}); | ||
|
||
const service = new Microservice(NotificationsServiceConfiguration); | ||
service.start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 6 additions & 12 deletions
18
notifications-service/src/main/typescript/messages-api/channels.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,28 @@ | ||
import { piperkt } from "../events-lib"; | ||
|
||
export class ChannelCreatedMessage extends piperkt.events.ChannelCreatedEvent { | ||
static topic = "channel-topics"; | ||
static type = "ChannelCreatedEvent"; | ||
static topic = this.Companion.TOPIC; | ||
} | ||
|
||
export class ChannelUpdatedMessage extends piperkt.events.ChannelUpdatedEvent { | ||
static topic = "channel-topics"; | ||
static type = "ChannelUpdated"; | ||
static topic = this.Companion.TOPIC; | ||
} | ||
|
||
export class ChannelDeletedMessage extends piperkt.events.ChannelDeletedEvent { | ||
static topic = "channel-topics"; | ||
static type = "ChannelDeleted"; | ||
static topic = this.Companion.TOPIC; | ||
} | ||
|
||
export class NewMessageOnChannelMessage extends piperkt.events | ||
.MessageInChannelEvent { | ||
static topic = "channel-topics"; | ||
static type = "MessageInChannelEvent"; | ||
static topic = this.Companion.TOPIC; | ||
} | ||
|
||
export class UserJoinedMultimediaChannelMessage extends piperkt.events | ||
.ParticipantJoinedEvent { | ||
static topic = "multimedia"; | ||
static type = "ParticipantJoined"; | ||
static topic = this.Companion.TOPIC; | ||
} | ||
|
||
export class UserLeftMultimediaChannelMessage extends piperkt.events | ||
.ParticipantLeftEvent { | ||
static topic = "multimedia"; | ||
static type = "ParticipantLeft"; | ||
static topic = this.Companion.TOPIC; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 6 additions & 12 deletions
18
notifications-service/src/main/typescript/messages-api/servers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,28 @@ | ||
import { piperkt } from "../events-lib"; | ||
|
||
export class ServerCreatedMessage extends piperkt.events.ServerCreatedEvent { | ||
static topic = "server-events"; | ||
static type = "ServerCreatedEvent"; | ||
static topic = this.Companion.TOPIC; | ||
} | ||
|
||
export class ServerUpdatedMessage extends piperkt.events.ServerUpdatedEvent { | ||
static topic = "server-events"; | ||
static type = "ServerUpdatedEvent"; | ||
static topic = this.Companion.TOPIC; | ||
} | ||
|
||
export class ServerDeletedMessage extends piperkt.events.ServerDeletedEvent { | ||
static topic = "server-events"; | ||
static type = "ServerDeletedEvent"; | ||
static topic = this.Companion.TOPIC; | ||
} | ||
|
||
export class UserJoinedServerMessage extends piperkt.events | ||
.ServerUserAddedEvent { | ||
static topic = "server-events"; | ||
static type = "ServerUserAddedEvent"; | ||
static topic = this.Companion.TOPIC; | ||
} | ||
|
||
export class UserLeftServerMessage extends piperkt.events | ||
.ServerUserRemovedEvent { | ||
static topic = "server-events"; | ||
static type = "ServerUserRemovedEvent"; | ||
static topic = this.Companion.TOPIC; | ||
} | ||
|
||
export class UserKickedFromServerMessage extends piperkt.events | ||
.ServerUserKickedEvent { | ||
static topic = "server-events"; | ||
static type = "ServerUserKickedEvent"; | ||
static topic = this.Companion.TOPIC; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters