Error when overrides function sendPresence
See original GitHub issueDear jcbrand!
When I write plugin like this converse-js-plugin But It show error
TypeError: this.constructPresence is not a function
converse.connection.send(this.constructPresence(type, status_message));
And I Override other function It’s same problem My code
ChatBoxes: {
onMessage: function (message) {
var $message = $(message),
contact_jid, $forwarded, $delay, from_bare_jid, from_resource, is_me, msgid,
chatbox, resource,
from_jid = $message.attr('from'),
to_jid = $message.attr('to'),
to_resource = Strophe.getResourceFromJid(to_jid);
console.log("[docaohuynh] FROM TO" + from_jid + " TO " + to_jid);
this._super.onMessage(message);
}
}
Error
TypeError: this.getChatBox is not a function
chatbox = this.getChatBox(contact_jid, $message.find('body').length > 0);
So What’s wrong with this code Tks!
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Mistake when overriding C++ virtual function - Stack Overflow
An overridden method has to have the same signature, i.e. argument and return types, as the base method. The compiler can notify you...
Read more >Writing a plugin — Converse 10.0.0 documentation
We can override is as follows: */ XMPPStatus: { sendPresence: function (type, status_message, ... then no error will be raised if the plugin...
Read more >strophe.js
error, Log a message at the Strophe.LogLevel.ERROR level. ... sendPresence, Helper function to send presence stanzas. ... User code can override this with....
Read more >Jitsi meet plugin · Issue #7 · conversejs/community ... - GitHub
I am trying to get password of user in the jitisInitalize function. but its undefine. could you help me ? The text was...
Read more >Compiler Error CS0505 - Microsoft Learn
'member1': cannot override because 'member2' is not a function. A class declaration attempted to override a non-method in a base class.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks! jcbrand. It work perfectly
When you call
_super
methods, you need to bind them to the correct context.Like this: