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] more message actions to threads context(follow, unfollow, copy, delete) #14387

Merged
merged 2 commits into from
May 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/autotranslate/client/lib/actionButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Meteor.startup(function() {
context: [
'message',
'message-mobile',
'threads',
],
action() {
const { msg: message } = messageArgs(this);
Expand All @@ -41,6 +42,7 @@ Meteor.startup(function() {
context: [
'message',
'message-mobile',
'threads',
],
action() {
const { msg: message } = messageArgs(this);
Expand Down
8 changes: 4 additions & 4 deletions app/message-star/client/actionButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Meteor.startup(function() {
id: 'star-message',
icon: 'star',
label: 'Star',
context: ['starred', 'message', 'message-mobile'],
context: ['starred', 'message', 'message-mobile', 'threads'],
action() {
const { msg: message } = messageArgs(this);
message.starred = Meteor.userId();
Expand All @@ -37,7 +37,7 @@ Meteor.startup(function() {
id: 'unstar-message',
icon: 'star',
label: 'Unstar_Message',
context: ['starred', 'message', 'message-mobile'],
context: ['starred', 'message', 'message-mobile', 'threads'],
action() {
const { msg: message } = messageArgs(this);
message.starred = false;
Expand All @@ -62,7 +62,7 @@ Meteor.startup(function() {
id: 'jump-to-star-message',
icon: 'jump',
label: 'Jump_to_message',
context: ['starred'],
context: ['starred', 'threads'],
action() {
const { msg: message } = messageArgs(this);
if (window.matchMedia('(max-width: 500px)').matches) {
Expand All @@ -85,7 +85,7 @@ Meteor.startup(function() {
icon: 'permalink',
label: 'Get_link',
classes: 'clipboard',
context: ['starred'],
context: ['starred', 'threads'],
async action(event) {
const { msg: message } = messageArgs(this);
$(event.currentTarget).attr('data-clipboard-text', await MessageAction.getPermaLink(message._id));
Expand Down
1 change: 1 addition & 0 deletions app/reactions/client/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Meteor.startup(function() {
context: [
'message',
'message-mobile',
'threads',
],
action(event) {
event.stopPropagation();
Expand Down
2 changes: 1 addition & 1 deletion app/threads/client/messageAction/follow.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Meteor.startup(function() {
id: 'follow-message',
icon: 'bell',
label: 'Follow_message',
context: ['threads'],
context: ['message', 'message-mobile', 'threads'],
async action() {
const { msg } = messageArgs(this);
call('followMessage', { mid: msg._id });
Expand Down
2 changes: 1 addition & 1 deletion app/threads/client/messageAction/unfollow.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Meteor.startup(function() {
id: 'unfollow-message',
icon: 'bell-off',
label: 'Unfollow_message',
context: ['threads'],
context: ['message', 'message-mobile', 'threads'],
async action() {
const { msg } = messageArgs(this);
call('unfollowMessage', { mid: msg._id });
Expand Down
14 changes: 7 additions & 7 deletions app/ui-utils/client/lib/MessageAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Meteor.startup(async function() {
id: 'reply-directly',
icon: 'reply-directly',
label: 'Reply_in_direct_message',
context: ['message', 'message-mobile'],
context: ['message', 'message-mobile', 'threads'],
action() {
const { msg } = messageArgs(this);
roomTypes.openRouteLink('d', { name: msg.u.username }, {
Expand All @@ -174,7 +174,7 @@ Meteor.startup(async function() {
id: 'quote-message',
icon: 'quote',
label: 'Quote',
context: ['message', 'message-mobile'],
context: ['message', 'message-mobile', 'threads'],
action() {
const { msg: message } = messageArgs(this);
const { input } = chatMessages[message.rid];
Expand Down Expand Up @@ -206,7 +206,7 @@ Meteor.startup(async function() {
icon: 'permalink',
label: 'Get_link',
classes: 'clipboard',
context: ['message', 'message-mobile'],
context: ['message', 'message-mobile', 'threads'],
async action(event) {
const { msg: message } = messageArgs(this);
const permalink = await MessageAction.getPermaLink(message._id);
Expand All @@ -229,7 +229,7 @@ Meteor.startup(async function() {
icon: 'copy',
label: 'Copy',
classes: 'clipboard',
context: ['message', 'message-mobile'],
context: ['message', 'message-mobile', 'threads'],
action(event) {
const { msg: message } = messageArgs(this);
$(event.currentTarget).attr('data-clipboard-text', message);
Expand All @@ -250,7 +250,7 @@ Meteor.startup(async function() {
id: 'edit-message',
icon: 'edit',
label: 'Edit',
context: ['message', 'message-mobile'],
context: ['message', 'message-mobile', 'threads'],
action() {
const { msg } = messageArgs(this);
chatMessages[Session.get('openedRoom')].edit(document.getElementById(msg._id));
Expand Down Expand Up @@ -290,7 +290,7 @@ Meteor.startup(async function() {
id: 'delete-message',
icon: 'trash',
label: 'Delete',
context: ['message', 'message-mobile'],
context: ['message', 'message-mobile', 'threads'],
color: 'alert',
action() {
const { msg: message } = messageArgs(this);
Expand All @@ -315,7 +315,7 @@ Meteor.startup(async function() {
id: 'report-message',
icon: 'report',
label: 'Report',
context: ['message', 'message-mobile'],
context: ['message', 'message-mobile', 'threads'],
color: 'alert',
action() {
const { msg: message } = messageArgs(this);
Expand Down