mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
feat(users): add editable usernames (#715)
This commit is contained in:
@@ -104,7 +104,7 @@ class DiscordAgent
|
||||
fields.push(
|
||||
{
|
||||
name: 'Requested By',
|
||||
value: payload.notifyUser.username ?? '',
|
||||
value: payload.notifyUser.displayName ?? '',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
@@ -126,7 +126,7 @@ class DiscordAgent
|
||||
fields.push(
|
||||
{
|
||||
name: 'Requested By',
|
||||
value: payload.notifyUser.username ?? '',
|
||||
value: payload.notifyUser.displayName ?? '',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
@@ -148,7 +148,7 @@ class DiscordAgent
|
||||
fields.push(
|
||||
{
|
||||
name: 'Requested By',
|
||||
value: payload.notifyUser.username ?? '',
|
||||
value: payload.notifyUser.displayName ?? '',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
@@ -170,7 +170,7 @@ class DiscordAgent
|
||||
fields.push(
|
||||
{
|
||||
name: 'Requested By',
|
||||
value: payload.notifyUser.username ?? '',
|
||||
value: payload.notifyUser.displayName ?? '',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
|
@@ -60,7 +60,7 @@ class EmailAgent
|
||||
mediaName: payload.subject,
|
||||
imageUrl: payload.image,
|
||||
timestamp: new Date().toTimeString(),
|
||||
requestedBy: payload.notifyUser.username,
|
||||
requestedBy: payload.notifyUser.displayName,
|
||||
actionUrl: applicationUrl
|
||||
? `${applicationUrl}/${payload.media?.mediaType}/${payload.media?.tmdbId}`
|
||||
: undefined,
|
||||
@@ -106,7 +106,7 @@ class EmailAgent
|
||||
mediaName: payload.subject,
|
||||
imageUrl: payload.image,
|
||||
timestamp: new Date().toTimeString(),
|
||||
requestedBy: payload.notifyUser.username,
|
||||
requestedBy: payload.notifyUser.displayName,
|
||||
actionUrl: applicationUrl
|
||||
? `${applicationUrl}/${payload.media?.mediaType}/${payload.media?.tmdbId}`
|
||||
: undefined,
|
||||
@@ -144,7 +144,7 @@ class EmailAgent
|
||||
mediaName: payload.subject,
|
||||
imageUrl: payload.image,
|
||||
timestamp: new Date().toTimeString(),
|
||||
requestedBy: payload.notifyUser.username,
|
||||
requestedBy: payload.notifyUser.displayName,
|
||||
actionUrl: applicationUrl
|
||||
? `${applicationUrl}/${payload.media?.mediaType}/${payload.media?.tmdbId}`
|
||||
: undefined,
|
||||
@@ -181,7 +181,7 @@ class EmailAgent
|
||||
mediaName: payload.subject,
|
||||
imageUrl: payload.image,
|
||||
timestamp: new Date().toTimeString(),
|
||||
requestedBy: payload.notifyUser.username,
|
||||
requestedBy: payload.notifyUser.displayName,
|
||||
actionUrl: applicationUrl
|
||||
? `${applicationUrl}/${payload.media?.mediaType}/${payload.media?.tmdbId}`
|
||||
: undefined,
|
||||
@@ -218,7 +218,7 @@ class EmailAgent
|
||||
mediaName: payload.subject,
|
||||
imageUrl: payload.image,
|
||||
timestamp: new Date().toTimeString(),
|
||||
requestedBy: payload.notifyUser.username,
|
||||
requestedBy: payload.notifyUser.displayName,
|
||||
actionUrl: applicationUrl
|
||||
? `${applicationUrl}/${payload.media?.mediaType}/${payload.media?.tmdbId}`
|
||||
: undefined,
|
||||
|
@@ -48,42 +48,42 @@ class PushoverAgent
|
||||
|
||||
const title = payload.subject;
|
||||
const plot = payload.message;
|
||||
const user = payload.notifyUser.username;
|
||||
const username = payload.notifyUser.displayName;
|
||||
|
||||
switch (type) {
|
||||
case Notification.MEDIA_PENDING:
|
||||
messageTitle = 'New Request';
|
||||
message += `${title}\n\n`;
|
||||
message += `${plot}\n\n`;
|
||||
message += `<b>Requested By</b>\n${user}\n\n`;
|
||||
message += `<b>Requested By</b>\n${username}\n\n`;
|
||||
message += `<b>Status</b>\nPending Approval\n`;
|
||||
break;
|
||||
case Notification.MEDIA_APPROVED:
|
||||
messageTitle = 'Request Approved';
|
||||
message += `${title}\n\n`;
|
||||
message += `${plot}\n\n`;
|
||||
message += `<b>Requested By</b>\n${user}\n\n`;
|
||||
message += `<b>Requested By</b>\n${username}\n\n`;
|
||||
message += `<b>Status</b>\nProcessing Request\n`;
|
||||
break;
|
||||
case Notification.MEDIA_AVAILABLE:
|
||||
messageTitle = 'Now available!';
|
||||
message += `${title}\n\n`;
|
||||
message += `${plot}\n\n`;
|
||||
message += `<b>Requested By</b>\n${user}\n\n`;
|
||||
message += `<b>Requested By</b>\n${username}\n\n`;
|
||||
message += `<b>Status</b>\nAvailable\n`;
|
||||
break;
|
||||
case Notification.MEDIA_DECLINED:
|
||||
messageTitle = 'Request Declined';
|
||||
message += `${title}\n\n`;
|
||||
message += `${plot}\n\n`;
|
||||
message += `<b>Requested By</b>\n${user}\n\n`;
|
||||
message += `<b>Requested By</b>\n${username}\n\n`;
|
||||
message += `<b>Status</b>\nDeclined\n`;
|
||||
break;
|
||||
case Notification.TEST_NOTIFICATION:
|
||||
messageTitle = 'Test Notification';
|
||||
message += `${title}\n\n`;
|
||||
message += `${plot}\n\n`;
|
||||
message += `<b>Requested By</b>\n${user}\n`;
|
||||
message += `<b>Requested By</b>\n${username}\n`;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -69,7 +69,7 @@ class SlackAgent
|
||||
fields.push(
|
||||
{
|
||||
type: 'mrkdwn',
|
||||
text: `*Requested By*\n${payload.notifyUser.username ?? ''}`,
|
||||
text: `*Requested By*\n${payload.notifyUser.displayName ?? ''}`,
|
||||
},
|
||||
{
|
||||
type: 'mrkdwn',
|
||||
@@ -85,7 +85,7 @@ class SlackAgent
|
||||
fields.push(
|
||||
{
|
||||
type: 'mrkdwn',
|
||||
text: `*Requested By*\n${payload.notifyUser.username ?? ''}`,
|
||||
text: `*Requested By*\n${payload.notifyUser.displayName ?? ''}`,
|
||||
},
|
||||
{
|
||||
type: 'mrkdwn',
|
||||
@@ -101,7 +101,7 @@ class SlackAgent
|
||||
fields.push(
|
||||
{
|
||||
type: 'mrkdwn',
|
||||
text: `*Requested By*\n${payload.notifyUser.username ?? ''}`,
|
||||
text: `*Requested By*\n${payload.notifyUser.displayName ?? ''}`,
|
||||
},
|
||||
{
|
||||
type: 'mrkdwn',
|
||||
@@ -117,7 +117,7 @@ class SlackAgent
|
||||
fields.push(
|
||||
{
|
||||
type: 'mrkdwn',
|
||||
text: `*Requested By*\n${payload.notifyUser.username ?? ''}`,
|
||||
text: `*Requested By*\n${payload.notifyUser.displayName ?? ''}`,
|
||||
},
|
||||
{
|
||||
type: 'mrkdwn',
|
||||
|
@@ -51,7 +51,7 @@ class TelegramAgent
|
||||
|
||||
const title = this.escapeText(payload.subject);
|
||||
const plot = this.escapeText(payload.message);
|
||||
const user = this.escapeText(payload.notifyUser.username);
|
||||
const user = this.escapeText(payload.notifyUser.displayName);
|
||||
|
||||
/* eslint-disable no-useless-escape */
|
||||
switch (type) {
|
||||
|
@@ -16,7 +16,7 @@ const KeyMap: Record<string, string | KeyMapFunction> = {
|
||||
subject: 'subject',
|
||||
message: 'message',
|
||||
image: 'image',
|
||||
notifyuser_username: 'notifyUser.username',
|
||||
notifyuser_username: 'notifyUser.displayName',
|
||||
notifyuser_email: 'notifyUser.email',
|
||||
notifyuser_avatar: 'notifyUser.avatar',
|
||||
media_tmdbid: 'media.tmdbId',
|
||||
|
Reference in New Issue
Block a user