From e69f947547160ea2c965a3d4f5966c5f4a289340 Mon Sep 17 00:00:00 2001 From: Paul Fariello Date: Mon, 1 Apr 2019 20:39:39 +0320 Subject: Rework MUC reflected message filtering Reflected messages can't be filtered by nick only otherwise you might ignore messages comming from you on another devices. Consequently we maintain a list of sent messages id in mucwin. To be sure the id will be correctly reflected we use the origin-id stanza. --- tests/unittests/ui/stub_ui.c | 4 ++-- tests/unittests/xmpp/stub_xmpp.c | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 950036bc..361a42e2 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -190,8 +190,8 @@ void mucwin_occupant_role_and_affiliation_change(ProfMucWin *mucwin, const char const char * const affiliation, const char * const actor, const char * const reason) {} void mucwin_roster(ProfMucWin *mucwin, GList *occupants, const char * const presence) {} void mucwin_history(ProfMucWin *mucwin, const char * const nick, GDateTime *timestamp, const char * const message) {} -void mucwin_incoming_msg(ProfMucWin *mucwin, const char *const nick, const char *const message, GSList *mentions, GList *triggers, prof_enc_t enc_mode) {} -void mucwin_outgoing_msg(ProfMucWin *mucwin, const char *const message, prof_enc_t enc_mode) {} +void mucwin_incoming_msg(ProfMucWin *mucwin, const char *const nick, const char *const message, const char *const id, GSList *mentions, GList *triggers, prof_enc_t enc_mode) {} +void mucwin_outgoing_msg(ProfMucWin *mucwin, const char *const message, const char *const id, prof_enc_t enc_mode) {} void mucwin_subject(ProfMucWin *mucwin, const char * const nick, const char * const subject) {} void mucwin_requires_config(ProfMucWin *mucwin) {} void ui_room_destroy(const char * const roomjid) {} diff --git a/tests/unittests/xmpp/stub_xmpp.c b/tests/unittests/xmpp/stub_xmpp.c index bc2c50db..53a729e6 100644 --- a/tests/unittests/xmpp/stub_xmpp.c +++ b/tests/unittests/xmpp/stub_xmpp.c @@ -114,7 +114,10 @@ char* message_send_chat_pgp(const char * const barejid, const char * const msg, } void message_send_private(const char * const fulljid, const char * const msg, const char *const oob_url) {} -void message_send_groupchat(const char * const roomjid, const char * const msg, const char *const oob_url) {} +char* message_send_groupchat(const char * const roomjid, const char * const msg, const char *const oob_url) +{ + return NULL; +} void message_send_groupchat_subject(const char * const roomjid, const char * const subject) {} void message_send_inactive(const char * const barejid) {} -- cgit 1.4.1-2-gfad0 eness?id=bd922a26511e7fc2be2229673b4cc81745e7403d'>plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50