about summary refs log tree commit diff stats
path: root/src/ui/mucwin.c
Commit message (Collapse)AuthorAgeFilesLines
* Exit *_incoming_msg functions when plain message is emptyMichael Vetter2022-07-041-0/+5
| | | | Fix https://github.com/profanity-im/profanity/issues/1733
* Update copyright yearMichael Vetter2022-05-091-1/+1
|
* Add none option for /whoMarcoPolo-PasTonMolo2022-03-271-0/+6
| | | | | Fixes https://github.com/profanity-im/profanity/issues/1425 `/who none` now displays all users in an muc without an affiliation
* Add quote autocompletion for previous messagesMarcoPolo-PasTonMolo2022-03-211-0/+3
| | | | | | | | | | Fixes https://github.com/profanity-im/profanity/issues/1649 Type `>` then press tab or shift tab to autocomplete previous messages, then type your reply and send message. Newlines are replaced with newline followed by `> `. A newline is added at the end so that the user can immediately type a message without manually adding a new line.
* Format code correctlyMichael Vetter2021-10-051-1/+1
|
* Don't handle /me in the middle of a message with mentionsDmitry Podgorny2021-07-171-2/+3
|
* Fix buffer overread in _mucwin_print_mention()Dmitry Podgorny2021-07-171-3/+3
| | | | | | Offset for g_utf8_substring() is higher than the string length. We can avoid g_utf8_substring() for the tail and simply convert starting offset to a pointer.
* Fix multiple mentions in one lineMichael Vetter2021-06-081-1/+4
| | | | | | | | `jubalh: jubalh jubalh` resulted in `20:32:34 - testuser1: jubalh20:32:34 - testuser1: : jubalh20:32:34 - testuser1: jubalh` Print date/nick only once at beginning of line.
* Use utf-8 safe functions in _mucwin_print_mention()Michael Vetter2021-06-081-5/+12
| | | | | | | | | | get_mentions() correctly counts utf-8 chars. So the positions of mentions we get from there are correct. But in _mucwin_print_mention() we set position equal to byte. We need to use utf-8 safe functions here. Regards https://github.com/profanity-im/profanity/issues/1231
* Get rid of asprintf and _GNU_SOURCE defineMichael Vetter2021-03-301-1/+0
| | | | | | | _GNU_SOURCE was even in some files where it was not needed at all (http*). Let's replace asprintf() with g_strdup_printf().
* Add config.h in files were it was missingMichael Vetter2021-03-261-0/+2
| | | | Related to https://github.com/profanity-im/profanity/issues/1512
* MUC: Show offline members in sidebarThorben Günther2021-03-081-0/+3
|
* Update copyrightMichael Vetter2021-01-081-1/+1
|
* Fix various typosMichael Vetter2020-12-101-1/+1
|
* Apply coding styleMichael Vetter2020-07-071-189/+189
|
* Revert "Apply coding style"Michael Vetter2020-07-071-192/+192
| | | | | | This reverts commit 9b55f2dec0ea27a9ce4856e303425e12f866cea2. Sorting the includes creates some problems.
* Apply coding styleMichael Vetter2020-07-071-192/+192
| | | | Regards https://github.com/profanity-im/profanity/issues/1396
* Feature request - XEP-0373: OpenPGP for XMPP (OX)DebXWoody2020-06-291-0/+3
| | | | | | | | | Basic implementation of XEP-0373: OpenPGP for XMPP. https://xmpp.org/extensions/xep-0373.html Command /ox Issue: #1331
* Build URL ac upon printing of message in windowMichael Vetter2020-05-201-0/+1
|
* Remove unanimous MAM displayMichael Vetter2020-04-251-17/+6
| | | | | | For some time users could choose to have the old way "unanimous" where all the MUC history is just grey (or whatever was set). Now it is always just displayed like regular new incoming MUC text.
* _mucwin_print_mention(): No need to assign posMichael Vetter2020-04-201-1/+1
|
* Add to_jid field to ProfMessage structMichael Vetter2020-04-111-3/+3
| | | | | Is usefult in many cases if we want cleaner code. Hope this edit didn't break anything though ;-)
* Retrieve message type from databaseMichael Vetter2020-04-081-1/+1
| | | | So we don't have to check for MUC another way.
* Adapt win_print_history() to work with muc tooMichael Vetter2020-04-061-16/+1
|
* Use ProfMessage as parameter for win_println_incoming_muc_msg()Michael Vetter2020-03-091-1/+1
|
* Dont filter out own MUC messages if muc history is set to 'regular'Michael Vetter2020-02-211-3/+3
| | | | | | | | We use the same incoming function as for regular incoming text here. But don't want to filter out our own messages since we didn't print them during sending. Follow up to 8ee2cdadc88978ea26e6b6eb56f2aaa1fd5a81df
* Allow utf8 symbols as omemo/pgp/otr indicator charMichael Vetter2020-02-201-84/+91
| | | | Fix https://github.com/profanity-im/profanity/issues/1264
* Parse mentions and triggers in muc history if display is 'regular'Michael Vetter2020-02-201-19/+26
| | | | Fix https://github.com/profanity-im/profanity/issues/1261
* Add option to color MUC history like regular messagesMichael Vetter2020-02-201-1/+12
| | | | | | | | | `/logging group color` has: * `unanimous` which will color it with one unanimous color. Like it was done always. * `regular` which colors it like regular incoming messages. Regards https://github.com/profanity-im/profanity/issues/1261
* Refactor mucwin_history()Michael Vetter2020-02-191-6/+7
| | | | Just pass ProfMessage.
* Refactor win_print_history()Michael Vetter2020-02-171-1/+1
| | | | We never use the printf like behaviour anyways.
* Refactor win_print_outgoing_muc_msg()Michael Vetter2020-02-171-1/+1
| | | | We never use the printf like behaviour anyways.
* Refactor win_println_incoming_muc_msg()Michael Vetter2020-02-171-1/+1
| | | | We never use the printf like behaviour anyways.
* Rename `win_println_them_message()` -> `win_println_incoming_muc_msg()`Michael Vetter2020-02-141-1/+1
| | | | | | | | In aa3693daa211b36c78d136d5a1ee9f3258e21352 I renamed `win_println_me_message()` -> `win_print_outgoing_muc_msg()`. Now: `win_println_them_message()` -> `win_println_incoming_muc_msg()` to be more consistent and descriptive.
* xep-0308: Implement LMC for outgoing MUC messagesMichael Vetter2020-02-141-2/+19
| | | | | | Including OMEMO encrypted ones. Also rename `win_println_me_message()` to `win_print_outgoing_muc_msg() as I think it's a more descriptive name.
* xep-0308: Display corrected incoming MUC messages correctlyMichael Vetter2020-02-121-1/+1
|
* Update my Copyright to 2020Michael Vetter2020-01-031-1/+1
|
* separator: Enable for MUC and PRIVWIN tooMichael Vetter2019-12-131-0/+2
| | | | Fix https://github.com/profanity-im/profanity/issues/1238
* Add vim modelineMichael Vetter2019-11-131-0/+1
|
* Don't override ProfMessage Id with origin-idMichael Vetter2019-10-311-1/+1
| | | | | | | | | | Profanity sends the same value for both. Other clients might not. Safe both since we could need them later. Once we implement Last Message Correction we will need the regular id. If we override it with origin-id and another client chooses to not use the same value for id and origin-id then we can't interpret the id sent with the LMC request correctly.
* Replace sent_messages list with algoMichael Vetter2019-10-311-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | For OMEMO we had a list with our sent messages. It was used so that we don't decrypt our own messages in MUCs that come in via reflection. Recently for https://github.com/profanity-im/profanity/pull/1209 we started to use origin-id and use an algorithm so we can detect our own sent messages via checking origin-id. Profanity uses the same id for the message ID and origin-id. With 06f300a42c4c627b6f1817bd48d92f083ffd9883 we added the message_is_sent_by_us() function. We implemented XEP-0359 this way to fix https://github.com/profanity-im/profanity/issues/1201 so that we don't log our own messages in MUCs twice. We can now check whether the message was sent by us using this function and can get rid of the list. Probably we could also put many parts of the sv_ev_room_message() function inside (else) part of `if (!(g_strcmp0(mynick, message->jid->resourcepart) == 0 && message_is_sent_by_us(message))) {`. Have to look more closely whether any of this needs to be run in case the message actually comes from us.
* Remove not needed codeMichael Vetter2019-09-291-4/+0
| | | | Was left over from refactoring a long time ago.
* Rename prof_message_t into ProfMessagePaul Fariello2019-06-201-1/+1
|
* Set foreground color for untrusted messagesPaul Fariello2019-06-201-1/+1
|
* Add prof_message_t to wrap all message attributesPaul Fariello2019-06-201-15/+20
| | | | | | | Probably missing copy of body to plain in carbon and privmessage. Only covers the incoming message path because goal is OMEMO decryption of untrusted message. Cover some of the log functions but not all.
* Add myself to copyrightMichael Vetter2019-06-171-0/+1
| | | | Like discussed with James.
* Safe last MUC message timestamp per MUCMichael Vetter2019-06-111-0/+2
| | | | | | After pasis review of my code he thinks it's better to safe the timestamp per MUC so we can account for some problems that could occur with timing.
* Handle MUC anonymous state when auto starting OMEMOPaul Fariello2019-04-171-1/+1
| | | | | | | When auto joining a MUC we don't have access to required information so we just don't start OMEMO at this time. Once we receive disco info we then try to start OMEMO.
* Add OMEMO policyPaul Fariello2019-04-171-0/+19
| | | | | | | | | | | | There is 3 policy: - manual: OMEMO session are only started manually - automatic: OMEMO session are only started if they have been started manually before - always: OMEMO session are always started unless they have been ended manually before Closes #1040 and fixes #1052
* Handle message without id in MUCPaul Fariello2019-04-141-1/+1
| | | | Some clients seems to send message without id.