Commit graph

26 commits

Author SHA1 Message Date
dependabot[bot] 62e0821be2
Bump matrix-js-sdk from 20.1.0 to 21.0.1 (#959)
* Bump matrix-js-sdk from 20.1.0 to 21.0.0

Bumps [matrix-js-sdk](https://github.com/matrix-org/matrix-js-sdk) from 20.1.0 to 21.0.0.
- [Release notes](https://github.com/matrix-org/matrix-js-sdk/releases)
- [Changelog](https://github.com/matrix-org/matrix-js-sdk/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/matrix-org/matrix-js-sdk/compare/v20.1.0...v21.0.0)

---
updated-dependencies:
- dependency-name: matrix-js-sdk
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump matrix-js-sdk from 20.1.0 to 21.0.1

Bumps [matrix-js-sdk](https://github.com/matrix-org/matrix-js-sdk) from 20.1.0 to 21.0.1.
- [Release notes](https://github.com/matrix-org/matrix-js-sdk/releases)
- [Changelog](https://github.com/matrix-org/matrix-js-sdk/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/matrix-org/matrix-js-sdk/compare/v20.1.0...v21.0.1)

---
updated-dependencies:
- dependency-name: matrix-js-sdk
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix upload content

* Change min supported node

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ajay Bura <32841439+ajbura@users.noreply.github.com>
2022-11-08 20:19:22 +05:30
ginnyTheCat 15c1f6dadf
Allow rendering messages as plaintext (#805)
* Parse room input from user id and emoji

* Add more plain outputs

* Add reply support

* Always include formatted reply

* Add room mention parser

* Allow single linebreak after codeblock

* Remove margin from math display blocks

* Escape shrug

* Rewrite HTML tag function

* Normalize def keys

* Fix embedding replies into replies

* Don't add margin to file name

* Collapse spaces in HTML message body

* Don't crash with no plaintext rendering

* Add blockquote support

* Remove ref support

* Fix image html rendering

* Remove debug output

* Remove duplicate default option value

* Add table plain rendering support

* Correctly handle paragraph padding when mixed with block content

* Simplify links if possible

* Make blockquote plain rendering better

* Don't error when emojis are matching but not found

* Allow plain only messages with newlines

* Set user id as user mention fallback

* Fix mixed up variable name

* Replace replaceAll with replace
2022-09-14 14:30:06 +05:30
Ajay Bura bca00f46a9 Add plain text command 2022-09-11 12:18:32 +05:30
Ajay Bura ac155bbf4c
Fix commands (#791)
* Fix commands and added more

* Add /me & /shrug commands

* Add help command

* Fix cmd descriptions

* Add reason in command
2022-09-03 21:46:40 +05:30
ginnyTheCat 80aa55b706
Rework Markdown parsing (#719)
* Switch markdown parser

* Add inline maths

* Basic plain text rendering

* Add display math support

* Remove unnecessary <p> tag

* Fixed spoiler not working

* Add spoiler reason input support

* Make paragraphs display with newline in between

* Handle single newlines

* Fix typo when allowing start attribute

* Cleanup for merge

* Remove unused import
2022-08-21 19:34:09 +05:30
James a417980a81
Improve MIME type handling on File Upload and in Message Component (#688)
* move allowed MIME types to own util file

* add check for safe MIME type before choosing how to upload

* check for allowed blob type to decide what component to load

* re-add check for safe mimetype

* fix bracket positioning
2022-08-14 16:31:17 +05:30
Ajay Bura 3c1cc59d59 Escape html with markdown off (#732) 2022-08-11 14:28:39 +05:30
Ajay Bura 9187107751 Stop sending mxid in body for pills 2022-08-07 14:28:49 +05:30
Ajay Bura c6812b5b11 Reset read receipt on sending sticker 2022-08-06 12:50:23 +05:30
ginnyTheCat 04f910ee03
Blurhash support (#701)
* Generate blurhash client side

* Make blurhash generation faster

* Simple blurhash display support

* Make image display simpler

* Support non square images

* Don't attach video blurhash to thumbnail

* Add video display support

* Ignore alt tag missing warning

Co-authored-by: Ajay Bura <32841439+ajbura@users.noreply.github.com>
2022-08-06 09:26:26 +05:30
Ajay Bura edace32213
Custom emoji & Sticker support (#686)
* Remove comments

* Show custom emoji first in suggestions

* Show global image packs in emoji picker

* Display emoji and sticker in room settings

* Fix some pack not visible in emojiboard

* WIP

* Add/delete/rename images to exisitng packs

* Change pack avatar, name & attribution

* Add checkbox to make pack global

* Bug fix

* Create or delete pack

* Add personal emoji in settings

* Show global pack selector in settings

* Show space emoji in emojiboard

* Send custom emoji reaction as mxc

* Render stickers as stickers

* Fix sticker jump bug

* Fix reaction width

* Fix stretched custom emoji

* Fix sending space emoji in message

* Remove unnessesary comments

* Send user pills

* Fix pill generating regex

* Add support for sending stickers
2022-08-06 09:04:23 +05:30
James e6f395c643
Add support to play .mov files (#672)
* update allowed mimetypes

* fix .mov files failing to play in Chromium

* add check for  before passing to FileReader

* add missing semi-colon
2022-07-18 22:03:11 +05:30
ginnyTheCat b7c5902f67
Add LaTeX / math input and rendering support (#345)
* Initial display support

* Use better colors for error in math parsing

* Parse math markdown

* Use proper jsx

* Better copy support

* use css var directly

* Remove console.debug call

* Lazy load math module

* Show fallback while katex is loading
2022-04-24 21:18:35 +05:30
Nitan Alexandru Marcel a2655ee6a5
Fix loading on older browsers (#397) 2022-03-18 09:06:48 +05:30
ajbura 736f4edfbd Replace gfmHtml with gfmHtml() as per #282 2022-02-03 20:35:02 +05:30
ginnyTheCat 0e8219b200
Add support for sending spoiler markdown (#267)
* Basic spoiler markdown plugin

* Remove console.log statement
2022-01-31 21:28:42 +05:30
Emi 9ea9bf4035
Add support for sending room-local emoji (#209)
* Add support for sending room-local emoji

Does not add support for sending a room's emoji outside of that room, but enables users to
send an emoji if the packs in a room support it.  Does not include room emoji in the
picker YET.

* Amend PR #209: Don't freak out if the `pack` tag is missing

* Amending PR:  Refactor emojifier, use better method for retrieving packs

* Amending PR:  Improve resiliance to bad data in emoji state events

* Amend PR: Remove redundant code, fix crash on edit
2021-12-29 09:56:17 +05:30
Emi 90621bb1e3
Add support for sending user emoji using autocomplete (#205)
* Add support for sending user emoji using autocomplete

What's included:
- An implementation for detecting user emojis
- Addition of user emojis to the emoji autocomplete in the command bar
- Translation of shortcodes into image tags on message sending

What's not included:
- Loading emojis from the active room, loading the user's global emoji packs, loading emoji from spaces
- Selecting custom emoji using the emoji picker

This is a predominantly proof-of-concept change, and everything here may be subject to
architectural review and reworking.

* Amending PR:  Allow sending multiple of the same emoji

* Amending PR:  Add support for emojis in edited messages

* Amend PR:  Apply requested revisions

This commit consists of several small changes, including:
- Fix crash when the user doesn't have the im.ponies.user_emotes account data entry
- Add mx-data-emoticon attribute to command bar emoji
- Rewrite alt text in the command bar interface
- Remove "vertical-align" attribute from sent emoji

* Amending PR:  Fix bugs (listed below)

- Fix bug where sending emoji w/ markdown off resulted in a crash
- Fix bug where alt text in the command bar was wrong

* Amending PR:  Add support for replacement of twemoji shortcodes

* Amending PR: Fix & refactor getAllEmoji -> getShortcodeToEmoji

* Amending PR: Fix bug: Sending two of the same emoji corrupts message

* Amending PR:  Stylistic fixes
2021-12-28 08:59:39 +05:30
Ajay Bura 7e7a5e692e Refectored Message comp
Signed-off-by: Ajay Bura <ajbura@gmail.com>
2021-11-20 13:29:32 +05:30
unknown ac4c0ec1f6 added support for msg editing [#40] 2021-08-20 19:12:57 +05:30
unknown f49048c6e1 replaced commonmark with micromark and gfm support 2021-08-17 15:10:44 +05:30
unknown 7fddf80c09 bug fixed attachment related 2021-08-15 18:57:05 +05:30
unknown e730eb3a32 fixed reply formatting 2021-08-12 14:37:00 +05:30
unknown 717ffe560f added reply support 2021-08-11 13:29:01 +05:30
unknown 92ba6c9802 added markdown support 2021-08-09 14:44:06 +05:30
unknown 026f835a87 initial commit 2021-07-28 18:45:52 +05:30