aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala
diff options
context:
space:
mode:
authorMax Weller <maximilian.weller@stud.tu-darmstadt.de>2017-08-05 12:56:32 +0200
committerfiaxh <fiaxh@users.noreply.github.com>2017-08-05 12:56:32 +0200
commit4aee95703d5619f7d55373d2f0bb130781266656 (patch)
tree7f946073c7a6e4b059ee329cb148df097677a7bf /xmpp-vala
parentea174ab632ced082eb0f1c51cea1bc9dc5c7c89e (diff)
downloaddino-4aee95703d5619f7d55373d2f0bb130781266656.tar.gz
dino-4aee95703d5619f7d55373d2f0bb130781266656.zip
request history since last known messages (#110)
request history since last known messages when rejoining a room at startup
Diffstat (limited to 'xmpp-vala')
-rw-r--r--xmpp-vala/src/module/xep/0045_muc/module.vala7
1 files changed, 6 insertions, 1 deletions
diff --git a/xmpp-vala/src/module/xep/0045_muc/module.vala b/xmpp-vala/src/module/xep/0045_muc/module.vala
index 951ec7d1..a40f18d8 100644
--- a/xmpp-vala/src/module/xep/0045_muc/module.vala
+++ b/xmpp-vala/src/module/xep/0045_muc/module.vala
@@ -69,13 +69,18 @@ public class Module : XmppStreamModule {
public signal void self_removed_from_room(XmppStream stream, string jid, StatusCode code);
public signal void removed_from_room(XmppStream stream, string jid, StatusCode? code);
- public void enter(XmppStream stream, string bare_jid, string nick, string? password) {
+ public void enter(XmppStream stream, string bare_jid, string nick, string? password, string? history_since) {
Presence.Stanza presence = new Presence.Stanza();
presence.to = bare_jid + "/" + nick;
StanzaNode x_node = new StanzaNode.build("x", NS_URI).add_self_xmlns();
if (password != null) {
x_node.put_node(new StanzaNode.build("password", NS_URI).put_node(new StanzaNode.text(password)));
}
+ if (history_since != null) {
+ StanzaNode history_node = new StanzaNode.build("history", NS_URI);
+ history_node.set_attribute("since", history_since);
+ x_node.put_node(history_node);
+ }
presence.stanza.put_node(x_node);
stream.get_flag(Flag.IDENTITY).start_muc_enter(bare_jid, presence.id);