Commit Graph

9 Commits (68fbed92819f83e282af6394e568446b63158257)

Author SHA1 Message Date
Wim 1578ebb0e2 Refactor slack 7 years ago
Wim bd2a672c14 Refactor mattermost 7 years ago
Wim 4c506f7cc3 Use MediaServerDownload instead of MediaServerUpload for avatars 7 years ago
Wim 7886f05e88 Download (and upload) avatar images from mattermost and telegram when mediaserver is configured. Closes #362
An extra avatarMap (cache) is created for mattermost and telegram.
If MediaServerUpload is configured, the avatar images of users are downloaded the first time a
user sends a message.
If this download succeeds a message with EVENT_AVATAR_DOWNLOAD is sent to the originating protocol.
This message also contains a SHA field (in msg.Extra["file"]), if this is not empty, the sha will
be added to the avatarMap. (so we now have a userid-sha cache)

Next time this user sends a message, the MediaServerUpload/sha/userid.png URL will be used as the
avatar field.
7 years ago
Wim 2b15739b48 Remove double close 7 years ago
Wim 3480c88e90 Do not close body on err. Closes #364 7 years ago
Wim 80822b7fff Send chat notification if media is too big to be re-uploaded to MediaServer. See #359 7 years ago
Wim e0cbb69a4f Add MessageSplit option to split messages on MessageLength (irc). Closes #281 7 years ago
Wim ba5649d259 Add helper 7 years ago