Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
affd08bd
Commit
affd08bd
authored
Dec 17, 2017
by
Seve
Committed by
JC Brand
Feb 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send user's hint if any
parent
98fe6062
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
src/converse-spoilers.js
src/converse-spoilers.js
+7
-6
No files found.
src/converse-spoilers.js
View file @
affd08bd
...
...
@@ -22,9 +22,9 @@
}
function
getHint
()
{
let
hint
=
document
.
querySelector
(
'
.chat-textarea-hint
'
).
value
;
return
hasHint
()
?
hint
:
_
(
'
Spoiler
'
);
return
document
.
querySelector
(
'
.chat-textarea-hint
'
).
value
;
}
// The following line registers your plugin.
converse
.
plugins
.
add
(
"
converse-spoilers
"
,
{
...
...
@@ -157,14 +157,15 @@
'
overrides
'
:
{
'
ChatBoxView
'
:
{
'
createMessageStanza
'
:
function
()
{
debugger
;
let
messageStanza
=
this
.
__super__
.
createMessageStanza
.
apply
(
this
,
arguments
);
if
(
isEditSpoilerMessage
())
{
messageStanza
.
c
(
'
spoiler
'
,{
'
xmlns
'
:
'
urn:xmpp:spoiler:0
'
},
getHint
());
//TODO Check for hint or send __('Spoiler');
if
(
hasHint
()){
messageStanza
.
c
(
'
spoiler
'
,{
'
xmlns
'
:
'
urn:xmpp:spoiler:0
'
},
getHint
());
}
else
{
messageStanza
.
c
(
'
spoiler
'
,{
'
xmlns
'
:
'
urn:xmpp:spoiler:0
'
});
}
}
alert
(
messageStanza
);
return
messageStanza
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment