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
7839f208
Commit
7839f208
authored
Apr 05, 2018
by
worlword
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed sendMessage for so that tests will work again
parent
76d6b947
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
src/converse-chatview.js
src/converse-chatview.js
+10
-10
src/converse-muc-views.js
src/converse-muc-views.js
+3
-1
No files found.
src/converse-chatview.js
View file @
7839f208
...
@@ -813,7 +813,7 @@
...
@@ -813,7 +813,7 @@
return
stanza
;
return
stanza
;
},
},
sendMessage
(
message
)
{
sendMessage
(
message
,
file
=
null
)
{
/* Responsible for sending off a text message.
/* Responsible for sending off a text message.
*
*
* Parameters:
* Parameters:
...
@@ -821,7 +821,14 @@
...
@@ -821,7 +821,14 @@
*/
*/
// TODO: We might want to send to specfic resources.
// TODO: We might want to send to specfic resources.
// Especially in the OTR case.
// Especially in the OTR case.
_converse
.
connection
.
send
(
message
);
var
messageStanza
;
if
(
file
!==
null
){
messageStanza
=
this
.
createFileMessageStanza
(
message
);
}
else
{
messageStanza
=
this
.
createMessageStanza
(
message
);
}
_converse
.
connection
.
send
(
messageStanza
);
if
(
_converse
.
forward_messages
)
{
if
(
_converse
.
forward_messages
)
{
// Forward the message, so that other connected resources are also aware of it.
// Forward the message, so that other connected resources are also aware of it.
_converse
.
connection
.
send
(
_converse
.
connection
.
send
(
...
@@ -878,14 +885,7 @@
...
@@ -878,14 +885,7 @@
const
message
=
this
.
model
.
messages
.
create
(
attrs
);
const
message
=
this
.
model
.
messages
.
create
(
attrs
);
/* check, if a file was send. If true it will send the file with XEP-0066. */
/* check, if a file was send. If true it will send the file with XEP-0066. */
var
messageStanza
;
this
.
sendMessage
(
message
,
file
);
if
(
file
!==
null
){
messageStanza
=
this
.
createFileMessageStanza
(
message
);
}
else
{
messageStanza
=
this
.
createMessageStanza
(
message
);
}
this
.
sendMessage
(
messageStanza
);
},
},
getOutgoingMessageAttributes
(
text
,
spoiler_hint
)
{
getOutgoingMessageAttributes
(
text
,
spoiler_hint
)
{
...
...
src/converse-muc-views.js
View file @
7839f208
...
@@ -747,7 +747,9 @@
...
@@ -747,7 +747,9 @@
this
.
showStatusNotification
(
__
(
"
Error: could not execute the command
"
),
true
);
this
.
showStatusNotification
(
__
(
"
Error: could not execute the command
"
),
true
);
},
},
onMessageSubmitted
(
text
,
notNeeded
,
file
=
null
)
{
// the notNeeded-Parameter is there so this method has the same amount of parameters as converse-chatview.js->onMessageSubmitted
// this allows to call the same method from diffrent plugins
onMessageSubmitted
(
text
,
notNeeded
=
null
,
file
=
null
)
{
/* Gets called when the user presses enter to send off a
/* Gets called when the user presses enter to send off a
* message in a chat room.
* message in a chat room.
*
*
...
...
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