Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:change-notif-message #823

Merged
merged 12 commits into from
Mar 28, 2023
3 changes: 2 additions & 1 deletion src/services/notification.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export class NotificationService {
async sendVoteCount(
referencetype: ReferenceType,
referenceID: string,
upvotes: number,
): Promise<void> {
const destination: string = await (referencetype === ReferenceType.POST
? this.postRepository
Expand All @@ -166,7 +167,7 @@ export class NotificationService {
const notification = new Notification({
type: NotificationType.VOTE_COUNT,
referenceId: referenceID,
message: 'Your post is getting upvotes',
message: upvotes.toString(),
from: MyriadUserID,
});
const title = 'New Upvotes';
Expand Down
2 changes: 1 addition & 1 deletion src/services/vote.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export class VoteService {
this.metricService.publicMetric(type, referenceId).then(metric => {
if (this.upvoteCounter(metric.upvotes)) {
this.notificationService
.sendVoteCount(type, referenceId)
.sendVoteCount(type, referenceId, metric.upvotes)
.catch((err: Error) => {
throw err;
});
Expand Down