Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
solid-xmpp-chat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Components
solid-xmpp-chat
Merge requests
!112
Reply to message
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Reply to message
262_reply_to_message
into
beta
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Emmanuel Vodor
requested to merge
262_reply_to_message
into
beta
4 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
Allow replies in private chats
0
0
Merge request reports
Viewing commit
74614b89
Show latest version
1 file
+
7
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
74614b89
bugfix: allow replies in private chats
· 74614b89
ubermanu
authored
4 years ago
src/plugins/sib-reply-to-message.js
+
7
−
4
Options
@@ -14,9 +14,8 @@ converse.plugins.add('sib-reply-to-message', {
api
.
listen
.
on
(
'
getMessageActionButtons
'
,
(
el
,
buttons
)
=>
{
// Do not add if the message is not from a MUC
// Do not add if the message is from the current user
if
(
el
.
model
.
get
(
'
type
'
)
!==
'
groupchat
'
||
el
.
model
.
get
(
'
sender
'
)
===
'
me
'
)
{
if
(
el
.
model
.
get
(
'
sender
'
)
===
'
me
'
)
{
return
buttons
;
}
@@ -32,8 +31,12 @@ converse.plugins.add('sib-reply-to-message', {
chat_textarea
.
value
+=
`
${
message
.
replace
(
/^/gm
,
'
>
'
)}
\n`
;
}
// Add mention to the initial user and focus textarea
chat_textarea
.
value
+=
`@
${
el
.
model
.
get
(
'
nick
'
)}
`
;
// Add mention to the initial author for MUCs
const
nickname
=
el
.
model
.
get
(
'
nick
'
);
if
(
el
.
model
.
get
(
'
type
'
)
===
'
groupchat
'
&&
nickname
.
length
)
{
chat_textarea
.
value
+=
`@
${
nickname
}
`
;
}
chat_textarea
.
focus
();
},
'
button_class
'
:
'
chat-msg__action-reply
'
,
Loading